Hello,
About two days ago, I started receiving a new error code upon attempting client-credentials authorization. My code has not changed at all, so I’m left to wonder if I have been rate limited or something else? I will share the request code.
def auth(self):
# get the bearer token by issuing a request to the api with the auth_string
# using application-only auth method. https://dev.twitter.com/docs/auth/application-only-auth
# declare the consumer key and secret, concat them, and base64 encode them
params = {'grant_type':'client_credentials'}
auth_string = self.consumer_key+':'+self.consumer_secret
auth_string_b64 = base64.b64encode(auth_string)
headers = {
'Authorization': 'Basic ' + auth_string_b64,
'content-type':'application/x-www-form-urlencoded;charset=UTF-8'}
r = requests.post('https://api.twitter.com/oauth2/token',headers=headers,data=params).json()
self.access_token = r["access_token"]
return
This auth call will yield the following response:
Out[45]: Response 403
In [46]: r.content
Out[46]: '{"errors":[{"code":99,"message":"Unable to verify yourcredentials",“label”:“authenticity_token_error”}]}’
Have they changed something with the API? I would imagine they are in a code freeze now?
Thanks,
Alex