I am working on a project that involves pulling data from an external API. The API I am working with requires me to include an API key in the header of my requests.
This is the curl command provided by my API provider for reference:
curl -X GET --header ‘Accept: application/json’ --header ‘apiKey: MY_API_KEY’ ‘MY_URL’
I’ve been trying to figure out how to include this header in the requests I make within Glide, but so far I’ve been unsuccessful. I am able to use the new Experimental Code Column and Fetch JSON to interact with APIs, but I can’t see any way to include custom headers like my API key.
Does anyone know if there is a way to include custom headers in an API request within Glide? If not, does anyone know of any potential workarounds?
Any assistance on this would be greatly appreciated. Thank you in advance for your help!
You could do it with the JavaScript column, but it won’t be secure. That is, because the JavaScript is executed client side you would potentially be exposing your key.
That said, Glide have indicated that they intend to provide a mechanism for making secure authenticated API calls in the not too distant future.
In the meantime, your best (most secure) option would be to use an integration tool such as Make to do the call, and then post the data back to Glide via the API.