I am also working on getting a bearer token for my iOS app and am getting a 403 error with the message {“code”:99,“label”:“authenticity_token_error”,“message”:“Unable to verify your credentials”}.
I am making a POST request to https://api.twitter.com/oauth2/token with postData “grant_type=client_credentials”, application/x-www-form-urlencoded;charset=UTF-8 for Content_Type, g-zip for Accept-Encoding.
I am also adding a BASIC Authentication header (Basic XXXXXXXXXXXXX == for key Authorization) created by : base64encoded (have also tried url encoding before base64encoding).
If you can offer any insight to where I am going wrong it would be much appreciated!
Thanks -
Gloria