Hi, I’m trying to make a “POST oauth2/token” call to get a bearer token via Restlet client.
This is the call:
curl -i -X POST
-H “Content-Type:application/x-www-form-urlencoded;charset=UTF-8”
-H “Authorization:Basic (ConsumerKey:ConsumerSecret)”
-d
‘{“grant_type”:“client_credentials”}’
‘https://api.twitter.com/oauth2/token’
When (ConsumerKey:ConsumerSecret) is decoded as requested to 64base.
The response is:
{
“errors”: [
{
“code”: 99,
“message”: “Unable to verify your credentials”,
“label”: “authenticity_token_error”
}
]
}
After searching in the documentation and here - I cannot find any mistake in the request’s structure.
Any thoughts or ideas?