Hi! Trying to retrieve info for a twitter profile using the id. Getting 32 “could not authenticate you” error. I tried out the example curl request as well, using my oauth header, with the same result:

curl --request GET --url '...api.twitter.com/1.1/users/show.json?screen_name=twitterdev' --header 'authorization: OAuth oauth_consumer_key="xxx", oauth_nonce="d0flQKHetUBwGJqX6k2nK9m9Emub6iY1", oauth_signature="uLDLjzJrsJNSduJPZDnOG7Z4J4g%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1588413971", oauth_token="1438013328-FwGXRDNTjKHp1vgMtQQncD2chuzmM5ghtFOFMlW", oauth_version="1.0"'

Note that I’m able to retrieve followers (…api.twitter.com/1.1/followers/ids.json) using the same header:

curl --request GET --url '...api.twitter.com/1.1/followers/ids.json' --header 'authorization: OAuth oauth_consumer_key="xxx", oauth_nonce="VWpaMguOOQDOZSeY3uTcObsxj5EGBRwV", oauth_signature="up6se762ETNUpxYZlNeje0IYpwg%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1588410007", oauth_token="1438013328-FwGXRDNTjKHp1vgMtQQncD2chuzmM5ghtFOFMlW", oauth_version="1.0"'

The later, however, works only without parameters (I assume it returns followers based on the account associated with the authorization header information). If I append e.g. ?screen_name=twitterdev, I get the 32 error as well.

Error 32 means that you are probably having issues passing along the proper keys and tokens or authorizing your request. I suggest that you make sure to check the following:

  1. you are using the proper auth keys for this endpoint, which you can identify via the endpoint’s api reference page. It might help to review our authentication section for more details on this.
  2. you have properly generated the oauth nonce , oauth_signature , and oauth_timestamp for your request.

If you have properly set up your keys and tokens, then chances are that you aren’t handling number two properly. If so, please consider using an oauth library (example), Insomnia, or try using Twurl.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.