# Fetch json with token

**URL:** https://community.glideapps.com/t/fetch-json-with-token/53097
**Category:** Ask for Help
**Created:** [November 2, 2022, 6:47am UTC](https://community.glideapps.com/t/fetch-json-with-token/53097 "2022-11-02T06:47:46Z")
**Posts on this page:** 1
**Showing post:** 7

<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: [November 3, 2022, 11:45am UTC](https://community.glideapps.com/t/fetch-json-with-token/53097/7 "2022-11-03T11:45:01Z")

</div>

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:

```auto
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!

---

_[View the full topic](https://community.glideapps.com/t/fetch-json-with-token/53097)._
