Search code examples
twitteroauth-2.0oauthtwitter-oauthtwitter-api-v2

How to obtain user's email via Twitter API v1 or v2?


There's no clear information about this, neither at Twitter developer portal either.

How to obtain user's email via Twitter API OAuth v1 or v2? Is it possible at all nowadays?

Assume that a user has been authenticated with a proper "scope" permission


Solution

  • This is possible in Twitter API v1.1 and OAuth 1.0A, if:

    • the app has "request user email address" permissions in the developer portal for OAuth 1.0A, with the account access token granted after that was set (i.e. they saw "app can request your email address" in the list when authenticating), and...
    • the app calls /1.1/account/verify_credentials.json with the include_email=true parameter set

    This is not currently possible in Twitter API v2 with OAuth 2.0 but this is actively being worked on (and would be added via Open ID Connect in the future release when it is ready).