Change of error code if auth token revoked?


#1

Historically the verify_credentials API endpoint returned a 401 with a code of 89 if the user’s tokens have been revoked. It was still this way at least as late as October the 11th.

It seems it’s now returning the less specific 401 with a code of 32. I’d like to know if this is intentional and I should update my code to treat that as the new ‘invalid token’ code?

Here’s one of the docs that shows code 89 is the expected code: https://dev.twitter.com/docs/error-codes-responses


#2

Tim, thank you for the heads up. We are currently taking a look into this issue and will keep you updated as soon as we have the answer. Thanks for your patience.


#3

Romain, thanks. I expect a potential fix might take a bit longer, but could you confirm if the change is intentional or not?


#4

Hi Tim,

I can confirm that the change was unintentional. Hopefully will be fixed within a week or so.


#5

Tim, following up after Taylor’s reply, I can now confirm the fix has been deployed. You should now be getting an error code of 89 when the token is incorrect or has expired, like mentioned in the documentation. Thanks again for the report.


#6

Hi Romain and Taylor,

Thanks for your follow up. Much appreciated!

Tim.