skip to Main Content

On version 1.1 of the Twitter API, we could use "account/verify_credentials".

However this now requires Elevated access to use the 1.1 version of the API.

Is there a way todo it using the V2 part of the Twitter API?

Edit: all I need is the username

2

Answers


  1. At the moment, there is not a way to do this in v2. However, a future API feature may add this (probably as part of the OAuth 2.0 user implementation that is currently being worked on).

    You can request elevated access to get to v1.1 endpoints for free.

    Login or Signup to reply.
  2. It can be done through the GET /2/users/me API call, but that requires both the tweet.read and users.read scopes. This has the side effect of letting the app read tweets from any protected accounts you follow (and perhaps subscriber-only tweets).

    Ideally, Twitter would just implement OpenID Connect, but it currently does not. With that, you’d get an id_token in addition to the access_token and refresh_token. The id_token would identify which account was being used.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search