Application-only Authentication requests with bearer token throw "Not authorized." error after 10 requests


Hello everyone,

I want to get the friends and followers of the users that authenticated with Twitter to my app.
I successfully get the bearer token to send application-only authenticated requests.

The problem is that requests work successfully only for some specific users and for the rest of them throw a “Not authorized.” error.

This is not a rate limit exceeded problem, since I successfully handle them.

Any ideas ?

Thank you


What is the error response body? An example is {"errors":[{"message":"Invalid or expired token","code":89}]} You can find a list of error codes here.


I got the same error today, but in trying a few accounts I only get that error for accounts that are set to private.
Can you confirm that it’s throwing the error for private accounts?


Yes, this is the case for me too.