Could not authenticate you - code:32


#1

I’m using the Twitter API and trying to implement the ability for users to login using their twitter account and also retrieve their email address.

Twitter has an API endpoint with this url: https://api.twitter.com/1.1/account/verify_credentials.json

This retrieves information about the user. I can successfully return data about the user when I call this endpoint from my code. To get the email address you need to append “include_email=true” to the end of the user. When I do this I get the error:

{“errors”:[{“message”:”Could not authenticate you”,”code”:32}]}

So my new URL is: https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true

That is the only thing I’m changing is appending that key/value pair to the query string. For some reason I am not longer able to be authenticated after doing so. The error seems to happen regardless of which parameters I try to use (include_entities, skip_status, include_email) it does not matter which one, same error.

Any idea why this may be happening? My twitter app has the privacy policy/terms URL filled in and I’ve checked the box about getting a user’s email address in the settings. I’ve been stuck for hours trying to under why this is happening


#2

How do you get user’s credentials? Notice that if you add “?include_email=true” in url. The url in signature should also have “?include_email=true”.