Fetch JSON with authorization headers

Is there any way to fetch json from an API that requires authorization headers to be sent with a bearer token?

Does that service offer a parameter approach for the token? Something like:


1 Like

Unfortunately not, it’s yelps api which requires the token to be sent in headers

Does anyone know if sending headers with fetching JSON is possible right now with Glide?

I have the same problem. We really need a better JSON importer go just make a simple scheduled GET request daily, and parse the data to the appropriate column, allowing for body, headers, authorization type etc. Maybe it will work if you build the request in Postman, and copy the entire code? I’m pretty sure it’s going to return all the data into a single column though, which means you will have to do this hundreds of time for each column of data you want to import. I’m running in to Google sheet cell limitations, and I would like to import all the data for each object with a single GET request.

1 Like

The problem with this approach is that Glide will run all your requests at the same time, and if your API is not strong enough to handle it then it can’t scale. That’s just for 1 user. If multiple users log in at the same time then it will kill the API.

If you’re using a Sheet, I would suggest using Make to do scheduled HTTP calls to populate your Sheet. Users will only need to sync the imported data, opposed to having to do calls themselves on their devices.

1 Like

There are ways around that issue. Pagination will break the request into multiple iterations to prevent server timeout. The issue as stated with google sheets is the 1,000,000 cell limitation. Blank cells in rows are counted against the limit. I would gladly use sheets if were not for this limitation. My data set in one tab for example contains 10,000 rows.

If your service is returning an appropriate JSON, you won’t have to worry about the cell limitation. My thinking is a Make scenario with:

  • A HTTP call to fetch all data rows you need from your service.

  • A JSON module if needed, to appropriately read the returned JSON.

  • An iterator to iterate through the list of items in the JSON.

  • Add each item to Glide, either Glide Tables (with a Pro app) or Google Sheets.