5

A few days ago twitter updated some aspects of their API because of the GDPR changes. Starting today some of my applications have been breaking in a very odd way which I didn't expect would be affected by the GDPR changes. Maybe it has nothing to do with these changes but it is mysterious timing since they changed the API a few days ago and now I'm breaking. I am getting nothing back from the rate limit end point like I used to even 2-3 days ago.

I am using python and the twitter-application-only-auth==0.3.3 library and specifically I can log in and create client (so my tokens and permissions are still good) but when I do

client = Client(twitter_consumer_key, twitter_consumer_secret)
url = "https://api.twitter.com/1.1/application/rate_limit_status.json?resources=help,users,search,statuses"
print client.request( url)

I get back

{u'rate_limit_context': {u'application': u'AZljARxCJ6b4rPtCGJIuk4O'}, u'resources': {}}

Where resources is empty. I can't see how many API calls I have remaining for each end point and this is causing problems in my app. I don't see anything saying this endpoint is supposed to change: https://developer.twitter.com/en/docs/developer-utilities/rate-limit-status/api-reference/get-application-rate_limit_status.html

I can make other calls just fine. For example

client.request("https://api.twitter.com/1.1/users/lookup.json?screen_name=twitter")

works as expected and returns me data.... anyone else having this issue around the rate limit api endpoint? Am I doing something wrong?

hackartist
  • 5,172
  • 4
  • 33
  • 48
  • Got the same problem! – Emil Lykke Jensen May 31 '18 at 10:13
  • Same problem here in an application relying on Twitter4J. Worked fine before the GDPR-related changes went live. – MWiesner May 31 '18 at 11:55
  • This is not related to GDPR. The one API change that related to that was that timezone values are now null in the majority of user objects, and that went live 7 days ago per https://twittercommunity.com/t/upcoming-changes-to-the-developer-platform/104603/4 - this issue is more recent. – Andy Piper May 31 '18 at 12:51

1 Answers1

2

Looks like an issue. Investigating internally. In the meantime, I suggest using the x-rate-limit HTTP headers to track your limits (note that these are only valid with GET requests, and only for standard API endpoints). Note that this is nothing to do with any GDPR related update to the API.

Andy Piper
  • 11,422
  • 2
  • 26
  • 49
  • 1
    I can confirm this "issue" with obtaining "RateLimitStatus" for a Java/Twitter4J application. It's blocking/confusing many devs atm as apps are failing fast due to this weird behaviour. – MWiesner May 31 '18 at 11:58
  • There's more on this on the Twitter developer forum while we investigate. https://twittercommunity.com/t/application-rate-limit-status-broken/106429 – Andy Piper May 31 '18 at 12:49
  • 2
    I see that it appears to be fixed now. Thank you for the fast response to let me know that I wasn't doing something wrong and thank you for prioritizing it internally – hackartist May 31 '18 at 22:03