-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: access_token is required #71
Comments
Figured it out myself. Needed to send token.token instead of token when creating the authClient. As in:
|
Hey @alexdpoon, hope you are doing well! |
@RafayelKh, you can reference the interface GetTokenResponse {
/** Allows applications to obtain a new access token without user prompt using the refresh token flow. */
refresh_token?: string;
/** Tokens that applications utilize to make API requests on a user's behalf. */
access_token?: string;
token_type?: string;
expires_in?: number;
/** A comma-separated list detailing the scope of the token. */
scope?: string;
} I hope this helps clarify things! |
@ojmarte Why isn't the |
Hey! @feresr, regarding your question about why the Token type isn't exported in the Twitter API TypeScript SDK: From what I understand, it seems that the
|
Thanks for the quick reply @ojmarte ! Im storing this I wonder if this is the intended usage.🤔 |
Note that
|
When trying to post a new tweet with client.tweets.createTweet(), I get
Error: access_token is required
Expected behavior
I expect the post to be created without error.
Actual behavior
Exception is thrown with
Error: access_token is required
Steps to reproduce the behavior
After getting what looks to be a valid token using the code gotten from the callback:
const token = await authClient.requestAccessToken(code);
I create an authClient and client
Then I try to create the tweet using:
but I get an exception thrown with
Error: access_token is required
BTW, the token i'm passing into new auth.OAuth2User looks like:
The text was updated successfully, but these errors were encountered: