I am new to OAuth and have been playing around with the Twitter API. I am able to fetch the credentials of an user after authentication by making a request to http://api.twitter.com/1/account/verify_credentials.xml
. The response contains the user id, screen name etc. but not the email ID.
Is it possible at all to retrieve the email ID of the user?
Update
I believe Facebook provides this information if you specifically request for extended permissions. Is there something similar for Twitter?
Generating access tokensLogin to your Twitter account on developer.twitter.com. Navigate to the Twitter app dashboard and open the Twitter app for which you would like to generate access tokens. Navigate to the "Keys and Tokens" page. Select 'Create' under the "Access token & access token secret" section.
Now, when you log in to your account on twitter.com, Twitter for Android, or mobile.twitter.com, a six-digit code will be text messaged to your phone to use during login. Tap the checkbox next to Authentication app. Read the overview instructions, then tap Start. If prompted, enter your password and tap Verify.
The user's email address can not be retrieved via the API. This is a deliberate design decision by the API team.
UPDATE 2015.08.18:
It is possible to request an email address from users, but it requires your app to be whitelisted. See https://dev.twitter.com/rest/reference/get/account/verify_credentials for details of the API call and this form to request whitelisting of your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With