Open cjativa opened 3 years ago
I have the exact same problem, could you find a solution?
Just encountered this as well.
@mort3za As noted in the issue, this is solely a typings problem -- if you provide the oauth_token
parameter it'll get passed through correctly and the call should work. TypeScript users can just annotate the function parameter with an as any
for now, but it's confusing and definitely not ideal.
Describe the bug
There's a bug in what the
basics.oauthAccessToken(...)
method accepts in its parameters object.Right now, it only accepts the an object containing the field
oauth_verifier
.However, in order to successfully to return a valid access token, both the
oauth_verifier
andoauth_token
(where the request token is the value foroauth_token
) need to be passed. Per the docs below, theaccess_token
endpoint requires both parameters https://developer.twitter.com/en/docs/authentication/api-reference/access_tokenTo reproduce
Steps to reproduce the behavior: Here's the workflow I'm doing to reproduce the error
This request fails with
and there's no straightforward way to pass the request token into the call, except by annotating the
basics.oauthAccessToken(...)
call like thisExpected behavior
This should succeed and return the user information
Package Manager:
To install Twitter API Client, I used npm
Additional context
Add any other context about the problem here.