I have followed and double checked the steps to get a bearer token from https://dev.twitter.com/oauth/application-only
i keep getting the following error :
Status : 403 Forbidden
{"errors":[{"code":99,"message":"Unable to verify your credentials","label":"authenticity_token_error"}]}
I tried passing grant_type=client_credentials in body as well as query parameter.
The URL i am hitting is : https://api.twitter.com/oauth2/token?grant_type=client_credentials
Headers Set : Authorization : Basic [base64encoded(client_key:client_secret)] Content-Type : application/x-www-form-urlencoded;charset=UTF-8
I am using poster as the rest client to make the calls.
Could any one point out where i may be going wrong.
Thanks a lot.
curl -u <consumer_key>:<consumer_secret> -X POST -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" https://api.twitter.com/oauth2/token?grant_type=client_credentials
which should give you an access token – Hans Z.