# Javascript column to call API

**URL:** https://community.glideapps.com/t/javascript-column-to-call-api/57209
**Category:** Ask for Help
**Created:** [January 28, 2023, 10:58am UTC](https://community.glideapps.com/t/javascript-column-to-call-api/57209 "2023-01-28T10:58:12Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [January 28, 2023, 12:47pm UTC](https://community.glideapps.com/t/javascript-column-to-call-api/57209/4 "2023-01-28T12:47:35Z")

</div>

Hola @Kaiser2

You were close to get a good result but you need to change some things.

Take a look at this syntax and let me know what you get

> [@Fetch json with token](https://community.glideapps.com/t/fetch-json-with-token/53097/7):
>
> Hola! I think it’s possible but if you share your cURL command (or Fetch syntax) we can try to fix it. Your JS code might look like: var data= await fetch('YOUR\_URL', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'YOUR\_BearerToken' }, }); const json = await data.text(); // or data.json(); return json Saludos!

Saludos!

---

_[View the full topic](https://community.glideapps.com/t/javascript-column-to-call-api/57209)._
