Response Headers & OAuth Access Tokens - Getting Rate Limited

Hi there, I am having two issues.

Viewing Rate Limit Headers:
I’m trying to access my Rate Limit headers but not having much luck.

In Postman:

I redacted information just in case (unsure of whether or not there is any secret information there). The rate limit response headers should be here, however, they’re not…

OAuth Access Token…Did I set this up right?:
I am getting rate limited (429 responses).

How I gathered my Access Token:

I made a GET request to https://id.twitch.tv/oauth2/token to gather that information.

I am passing that access_token generated in as the Authorization value into my functions, like so:

I am still getting rate limited. I am unsure of what I did wrong, but I would love some help. Thank you so much!

Also, it’s worth mentioning when trying to validate the token, this was my body response.


I noticed scopes is set to null. Could this be the issue?

there are no rate limits on the token and validate endpoints other than don’t be a dick

IGDB is 4 concurrent requests at the same time
And IGDB doesn’t have a header to report this

https://api-docs.igdb.com/#rate-limits

app access/client credentials tokens, for Twitch/IGDB API’s do not take scopes so no.

Would it then be suggested to set a timeout for 1 second per four requests in my JavaScript functions then?

4 concurrent requests means you can have 4 requests active at the same time in parrelelelelelel.

if you do

request
request
request
request
request
request
request

one after the other you shouldn’t trip it

but if you do in parrelel

request request request request
request request request request
request request request request
request request request request
request request request request

you might as you have 4 jobs running in parrelelel

When I run my “Export all of IGDB” script I run it at 3 parralel jobs, and if I get a 419 I just requeue that job and go again.

So if you are doing four requests one after the other and they are not runnign side by side then you shouldn’t hit it.

1 Like

Thank you. I was able to fix my issue. My error was that I had designed a couple of functions to fetch different contents. I refactored my code, query, such that I have one function pulling all the necessary data I need now (using expansions). I am no longer getting rate limited or having issues.

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