Which authentication to use users / show?


#1

hello,
I want to get the number of followers of different account by entering their username. The users / show method will allow me to recover this information, I could test on apigee.
I can not understand how to get an access_token that will allow me to launch a call users / show via the creation of a siganture?

The only one I could get only allows me to make requests on my own account. What is the need to allow such a call?

Thanks for your help


#2

You can use the users/show method with user authentication. Unless you are trying to check a private account, any user token will work with any public user profile. For example, using twurl I can check your account.

$ twurl "/1.1/users/show.json?screen_name=youpioou" | jq '. | {followers: .followers_count}'
{
  "followers": 65
}

If an account is protected, then the user token you are using must be able to “see” the account in question.