I am working with user lookup API in the postman collection.
When I try to get the authenticated user information am getting 404 error message I have tried using this parameter as well(user.fields=created_at&expansions=pinned_tweet_id&tweet.fields=author_id,created_at

Cod)
For authorization, I tried using basic and bearer tokens, but they failed.

I don’t know how to get user information, can anyone help me out

The endpoint to get the authenticated user is GET /2/users/me | Docs | Twitter Developer Platform

You must authenticate with a token with User Context to use this - as in, oAuth1.0a access tokens, or oAuth2.0 PKCE, not oAuth2.0 App only bearer token.

Thank you so much for sharing the information.

I have followed this endpoint to get the code

After that I am using twittercom/oauth2/token to get token

Is that the right approach to get tokens?

I was hitting the wrong endpoint and I make sure about the client id and client’s secret.
endpoint:
image

Now it’s working fine

1 Like