undervoid
undervoid

Reputation: 203

Postman Twitter Api Authentication error - Code : 32

I’m currently facing an issue of authentication when trying to send a basic GET request. The result I get from that attempt looks like this :

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

I’m familiar with the fact that this error is rather common, but I find the problem intriguing, as it is still occurring after many hours trying to solve it. I used the app Postman (https://www.getpostman.com) to achieve this.

Here are the things I’ve tried to do :

Ensuring that the time and timezone of my machine are correctly set up Ensuring that the timezone of my Twitter is correctly set up Ensuring that the credentials are correct (identical to those from my Twitter app) Adding some basic parameters to my request Putting a link into the “callback_url” field in the app’s settings Using another library - Tweetinvi (https://github.com/linvi/tweetinvi1) Checking that the request URL was correct All from those previous attempts have been vain. No solution that I found was able to resolve my problem. Here’s a brief look at what my configuration in Postman looks like enter image description here

Thank you for your help.

Upvotes: 3

Views: 3256

Answers (1)

Michael Gasch
Michael Gasch

Reputation: 501

After running into some weird works/does not work auth issues** with Postman (v5.5 fat client and Chrome extension), I decided to try Insomnia Rest Client. Just to see if it's me or the REST Oauthv1 client.

** I got Postman working. After some time, without changing anything, it broke with:

{
    "errors": [
        {
            "code": 89,
            "message": "Invalid or expired token."
        }
    ]
}

Basically the same errors others were reporting here. And by checking with Insomnia I found out that it must be Postman related.

brew cask install insomnia on OSX gets you easily going (clients for Linux and Win also available). Then in the Insomnia client:

  1. Create New Request and give it a name (leave GET as method for our test)
  2. Select OAuth1 in the Auth tab
  3. Enter URL, e.g. https://api.twitter.com/1.1/search/tweets.json?q=%23golang
  4. Enter Twitter App auth (from https://apps.twitter.com) credentials
    1. Consumer Key
    2. Consumer Secret
    3. Token
    4. Token Secret
  5. Send request

If this works, like in my tests, then there's something wrong with Postman and it's not your fault :)

Upvotes: 6

Related Questions