Skip to content

How to get meAsUser #217

Answered by alkihis
OualiS asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

This variable can be obtained through a client with has an user context (with OAuth 1.0a login/OAuth 2.0 User context).

// OAuth 1.0a
// You can get all those keys in the twitter dev portal, it will be linked to your Twitter account
const userClient = new TwitterApi({ appKey: '', appSecret: '', accessToken: '', accessSecret: '' })
const meAsUser = await userClient.currentUser() 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alkihis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants