ger
ger

Reputation: 45

Twitter API Oauth2 issue getting Access Token

Following this guide: https://developer.twitter.com/en/docs/authentication/oauth-2-0/user-access-token. I am getting this error when making the POST oauth2/token at the step 3 request:

`

{
    "errors": [
        {
            "code": 99,
            "message": "Unable to verify your credentials",
            "label": "authenticity_token_error"
        }
    ]
}

`

This is my request: (Note that I hide the client_id and code). The code is the one I receive after the step 2, doing the GET oauth2/authorize callback. Header: Content-Type - application/x-www-form-urlencoded;charset=UTF-8

My Request

Upvotes: 0

Views: 676

Answers (1)

ger
ger

Reputation: 45

I found the issue, the problem was that in the Bot Application, editing the Auth settings of my twitter app, I had the option: Confidential client which needed a Basic Auth = authorization: Basic ${'username + password encoded here'}

Upvotes: 1

Related Questions