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


#1

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


#2

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.


#3

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?


#4

Yes, this is the case for me too.