Twitter api rate limit exceeded


#1

Twitter api rate limit exceeded after 13 request

Error : “Unable to retrieve news. Please ensure your data connection is enabled.
responseUserTimeLine.StatusCode: 429”

My request

first:
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "https://api.twitter.com/oauth2/token ");

second:
HttpRequestMessage requestUserTimeline = new HttpRequestMessage(HttpMethod.Get, “https://api.twitter.com//1.1/statuses/user_timeline.json?include_entities=false&include_rts=false&screen_name=caltrain&count=
+ 20.ToString(CultureInfo.InvariantCulture));

In the documentation - https://dev.twitter.com/docs/rate-limiting/1.1/limits

for GET statuses/user_timeline

180 Requests allotted per user and
300 Requests allotted via application-only auth

but I can only do an average of 13 request

Please help ?


#2

Are you negotiating your bearer token every time you’re making requests? Make sure that you persist your bearer token instead of continuously trying to refresh it.