Help

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

586 0
cancel
Showing results for 
Search instead for 
Did you mean: 
ianjang0718
4 - Data Explorer
4 - Data Explorer

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/1336...

 

0 Replies 0