Skip to main content

How to set Referer header when calling external API using Script Extentions/Automation


Forum|alt.badge.img

Hi,

I am trying to call an external API using airtable script extension/automation.
Those external APIs require Referer header validation. So, I tried the following based on the results of the search, but the Referer header is not set.

 

await fetch(URL, { method:'POST', headers: { 'Content-Type': 'application/json', 'Referer': 'https://airtable.com' }, referrer: 'https://airtable.com', referrerPolicy: 'origin' })

 

Please let me know if there is a way to set the Referer header.

The reason we need a Referer header is to verify that request is from the Airtable. If Airtable team have a remote server that performs script/automation, please let us know all the IP bands of the server. Then we can verify requests without Referer header.

[Reference]
https://airtable.com/developers/scripting/api/fetch
https://community.airtable.com/t5/development-apis/airtable-domain-used-for-fetch-requests/td-p/133649

 

0 replies

Be the first to reply!

Reply