# Getting rate limited with new OAuth tokens

**URL:** <https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098>\
**Category:** API\
**Created:** [April 5, 2018, 3:39am UTC](https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098 "2018-04-05T03:39:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![unique](https://avatars.discourse-cdn.com/v4/letter/u/f4b2a3/32.png) [@unique](https://discuss.dev.twitch.com/u/unique)\
**Post date:** [April 5, 2018, 3:39am UTC](https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098/1 "2018-04-05T03:39:22Z")

</div>

Hey I’m a bit confused on how I’m getting rate limited responses back when trying to subscribe to a webhook or querying for user information. I’m sending the below two curl commands:

> curl -vH “Authorization: Bearer _token_” -X GET ‘[https://api.twitch.tv/helix/users?id=\_userId\_](https://api.twitch.tv/helix/users?id=_userId_)’
> 
> curl -vH “Authorization: Bearer _token_” -H “Content-Type: application/json” -X POST -d ‘{“hub.mode”:“subscribe”, “hub.topic”:“[https://api.twitch.tv/helix/users/follows?first=1&to\_id=\_userId\_](https://api.twitch.tv/helix/users/follows?first=1&to_id=_userId_)”, “hub.callback”:“[http://e3c1c7e9.ngrok.io/callbacks](http://e3c1c7e9.ngrok.io/callbacks)”, “hub.lease\_seconds”:“0”, “hub.secret”: “”}’ [https://api.twitch.tv/helix/webhooks/hub](https://api.twitch.tv/helix/webhooks/hub)

Both are receiving a status code of 429 and the headers in the response show the following:

> Ratelimit-Limit: 120  
> Ratelimit-Remaining: 0  
> Ratelimit-Reset: 1522898025

I was using this same command about 24 hours ago and it worked fine. Then when I tried again about an hour ago I was getting throttled. I thought this was strange so I changed my password and created a new OAuth token but I saw the same response.

I know for a fact I am not hitting Twitch with more than 120 request a minute, what else could I be doing wrong?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [April 5, 2018, 8:06am UTC](https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098/2 "2018-04-05T08:06:54Z")

</div>

Rate limit is by IP address.

So you sure you got nothing else going on from your originating IP?

---

<div class="post-metadata">

**Author:** ![korstmos](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/korstmos/32/4364_2.png) [@korstmos](https://discuss.dev.twitch.com/u/korstmos)\
**Post date:** [April 5, 2018, 12:36pm UTC](https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098/3 "2018-04-05T12:36:27Z")

</div>

I am having the same problem here.

The old (v5) api is working just fine, but the new api is giving me 429 errors, under all circumstances.  
I am polling the top ~6k channels online every ~8 minutes, thus only making ~60 requests in single bursts nicely spaced out, but even after not running it at all on my personal network for hours I instantly get a 429 error, with a RateLimit-Reset of ~1 minute, a RateLimit-Limit of 120 and a RateLimit-Remaining of 0.

It was working fine for a couple days on my VPS, now it wont work on my vps, home network, or any IP, even with fresh & personal OAuth codes.  
At least the old API is still working, but I would like to keep working on making the switch to the new one.

---

<div class="post-metadata">

**Author:** ![unique](https://avatars.discourse-cdn.com/v4/letter/u/f4b2a3/32.png) [@unique](https://discuss.dev.twitch.com/u/unique)\
**Post date:** [April 5, 2018, 1:05pm UTC](https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098/4 "2018-04-05T13:05:01Z")

</div>

Makes me feel better knowing I’m not the only one getting errors. Thanks for verifying there’s a problem. Guess I’ll just wait until they fix the issue

---

<div class="post-metadata">

**Author:** ![korstmos](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/korstmos/32/4364_2.png) [@korstmos](https://discuss.dev.twitch.com/u/korstmos)\
**Post date:** [April 5, 2018, 4:02pm UTC](https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098/5 "2018-04-05T16:02:57Z")

</div>

@unique It just started working for me again!  
Lets hope it stays stable now 😛

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [May 5, 2018, 4:03pm UTC](https://discuss.dev.twitch.com/t/getting-rate-limited-with-new-oauth-tokens/15098/6 "2018-05-05T16:03:03Z")

</div>

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