Skip to content

Having trouble with OAuth2.0 User Context #144

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

You must be logged in to vote

Hi,

An access token, in OAuth 2.0 content, is a Bearer token. Just instanciate the class with it.

const client = new TwitterApi('accessToken')

If you want to use your refresh token, instanciate a client with your access token then use .refreshOAuth2Token (see here)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@karakotineeraj
Comment options

@alkihis
Comment options

alkihis Jan 4, 2022
Collaborator

Answer selected by karakotineeraj
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