# How to Include an API Key in a Header with Glide?

**URL:** <https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313>\
**Category:** Ask for Help\
**Created:** [June 29, 2023, 4:05pm UTC](https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313 "2023-06-29T16:05:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![solaire\_ICARE](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/solaire_icare/32/52607_2.png) [@solaire\_ICARE](https://community.glideapps.com/u/solaire_ICARE)\
**Post date:** [June 29, 2023, 4:05pm UTC](https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313/1 "2023-06-29T16:05:03Z")

</div>

Hello Glide Community,

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!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 29, 2023, 4:18pm UTC](https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313/2 "2023-06-29T16:18:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [June 29, 2023, 5:57pm UTC](https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313/3 "2023-06-29T17:57:10Z")

</div>

Hola @solaire_ICARE

Try playing with this tip (it should work) [Fetch json with token - #7 by gvalero](https://community.glideapps.com/t/fetch-json-with-token/53097/7)

but there are some issues regarding security as Darren explained you above, be careful.

Saludos!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 30, 2023, 12:43am UTC](https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313/4 "2023-06-30T00:43:39Z")

</div>

Please don’t post duplicate threads next time. I will close the other one.

> [@Get JSON WITH API key](https://community.glideapps.com/t/get-json-with-api-key/63295):
>
> Good day to you, I would like to get datas from an API key. I know how to do it when there is no API key ( I just get the datas with fetch JSON) But when there is an API key, how can I add it inside my Glide datas? Thanks

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [August 11, 2023, 7:20pm UTC](https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313/5 "2023-08-11T19:20:47Z")

</div>

Here you go! [🆕 Call API: call custom APIs, and return data back to your app](https://community.glideapps.com/t/call-api-call-custom-apis-and-return-data-back-to-your-app/64938)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [August 18, 2023, 7:21pm UTC](https://community.glideapps.com/t/how-to-include-an-api-key-in-a-header-with-glide/63313/6 "2023-08-18T19:21:13Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
