# Call API header name error: "not legal"

**URL:** https://community.glideapps.com/t/call-api-header-name-error-not-legal/71356
**Category:** Ask for Help
**Created:** [March 2, 2024, 1:20pm UTC](https://community.glideapps.com/t/call-api-header-name-error-not-legal/71356 "2024-03-02T13:20:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Northbridge\_Recruitm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/northbridge_recruitm/32/68895_2.png) [@Northbridge\_Recruitm](https://community.glideapps.com/u/Northbridge_Recruitm)
#### Post date: [March 2, 2024, 1:20pm UTC](https://community.glideapps.com/t/call-api-header-name-error-not-legal/71356/1 "2024-03-02T13:20:36Z")

</div>

Im not sure whether this is a bug or not, but im trying to set up a Call API action. The header is “Authorization: Bearer #API\_Key#”

When i enter a custom value for the header as “Authorization: Bearer” followed by the API key as the value, i get this error:

_Call API: TypeError: Authorization Bearer: is not a legal HTTP header name_

I cant figure out any other way to set it up, but feel like i must be doing something wrong as “Authorization: Bearer” is commonly used for an authentication header…

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [March 2, 2024, 1:40pm UTC](https://community.glideapps.com/t/call-api-header-name-error-not-legal/71356/2 "2024-03-02T13:40:52Z")

</div>

Check out this video and observe how the headers are set up for the authorization. I have a feeling you might be configuring it wrong.

> [@Using Call API and Glide API to add rows to related tables. Also...JSON Object!](https://community.glideapps.com/t/using-call-api-and-glide-api-to-add-rows-to-related-tables-also-json-object/70860):
>
> I wanted to show how you can use our new JSON columns to allow you use Call API into the Glide API. This allows you to create multiple rows in a different table and related them to the main table. Marco created a great [video](https://www.youtube.com/watch?v=b7_k3_brusQ&t=6s) showing how this was done with an older method (before we had all the great new JSON columns) that used a combination of template fields but you can do this all with just a JSON Object column now. Here is a [Loom video](https://www.loom.com/share/041b3cf99dec42c1a4d25af8c7aee38f) to explain. If I missed explaining anything feel free…

---

<div class="post-metadata">

### Author: ![Northbridge\_Recruitm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/northbridge_recruitm/32/68895_2.png) [@Northbridge\_Recruitm](https://community.glideapps.com/u/Northbridge_Recruitm)
#### Post date: [March 2, 2024, 1:41pm UTC](https://community.glideapps.com/t/call-api-header-name-error-not-legal/71356/3 "2024-03-02T13:41:27Z")

</div>

I am! you replied before i got a chance to delete my post - i made such an embarrassing error.

The header name should be “Authorization” and the value should be Bearer #API\_Key#

Oops

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [March 2, 2024, 1:42pm UTC](https://community.glideapps.com/t/call-api-header-name-error-not-legal/71356/4 "2024-03-02T13:42:18Z")

</div>

No worries. This might be good information for others that run into the same issue.

---

<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: [March 9, 2024, 1:42pm UTC](https://community.glideapps.com/t/call-api-header-name-error-not-legal/71356/5 "2024-03-09T13:42:34Z")

</div>

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