I am trying to connect Twitter API with HTTP oAuth 2.0 Module.
Authorize URL: https://twitter.com/i/oauth2/authorize
Token URI: https://api.twitter.com/2/oauth2/token
Scope: tweet.write
Client ID & Client Secret
Authorize parameters
response_type=code
code_challenge=challenge
code_challenge_method=plain
redirect_uri=https://www.integromat.com/oauth/cb/twitter2
When I try to connect, I get an error
Missing required parameter [code_verifier]
Looks like, code_verifier
is not passed to https://api.twitter.com/2/oauth2/token
How can I solve the issue?
I can get the Authorize Page
But then I get the following error
{
"message": "The request failed due to failure of a previous request.",
"code": "SC424",
"suberrors": [
{
"message": "Status Code Error: 400",
"name": "RuntimeError"
}
],
"debug": [
[
"request",
"POST",
"https://api.twitter.com/2/oauth2/token",
{
"body": {
"code": "***",
"client_id": "-----",
"grant_type": "authorization_code",
"redirect_uri": "https://www.integromat.com/oauth/cb/oauth2"
},
"headers": {
"user-agent": "Make/production",
"authorization": "***",
"content-type": "application/x-www-form-urlencoded"
},
"timeout": 40000,
"type": "urlencoded"
}
],
[
"response",
400,
{
"body": {
"error": "invalid_request",
"error_description": "Missing required parameter [code_verifier]."
},
"headers": {
}
}
]
]
}