I have both used python code straight from the API.v2 example code in Twitter’s own github, and used cURL to try to connect to the Twitter stream as described in the developer portal tutorials
After the first time I ran it it was fine, but every time after that I receive a 429 error. This normally indicates exceeding rate limits but I used a custom rule which was a string only I tweeted twice, and I only connected once, not 50 times in 15 minutes (the rate limit). This also can’t be an error with the bearer token because I can still use cURL for other API functions like searching for tweets. This problem has also lasted across several hours of trying to run it once every 30 minutes.
Was it maybe how I disconnected with the stream initially, through force stopping the program instead of through the code? Any help appreciated
*Edit
I tried running it again and this time it worked. Very odd. The only difference was that I didn’t route the result to a file but that shouldn’t change the stream itself…
**Edit
And I’m receiving the error again immediately after it worked once, and I received exactly 2 tweets with my keyword that I tweeted.
1 Like
I’m curious to see if there is a formal way to end the connection in Python using the Twitter API example streamer as provided on the github.
2 Likes
A few months back I faced this same issue on V1.1 streaming API. I couldn’t understand why.
When I ran my code on another server with a different IP address, it worked.
It occurred to me that my IP was temporarily blacklisted for a few days.
According to Twitter’s Doc, 429 error code signifies “Too Many Requests”.
1 Like
system
closed
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.