Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current user's info from Twitter API

Tags:

twitter

I am building a Twitter app (with oAuth) and I cannot find any info on how I can get the current user's info.

By current user, I mean the user which granted my app permissions and for whom the app is making the requests to the API.

Any suggestions?

like image 969
Thomas Avatar asked Jun 27 '10 18:06

Thomas


People also ask

How do I find my Twitter API username?

Use GET https://api.twitter.com/1.1/users/show.json?user_id=ID and see the screen_name property of the returned JSON object.


2 Answers

It was actually "account/verify_credentials" as seen here:

https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials.html

like image 102
Swift Avatar answered Nov 18 '22 05:11

Swift


Link to the documentation for API v. 1.1: https://dev.twitter.com/docs/api/1.1/get/account/verify_credentials

like image 36
Pablo Torrecilla Avatar answered Nov 18 '22 06:11

Pablo Torrecilla