Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make calls to Twitter API using Postman client

I have followed the steps required to create a new application and getting consumer key, secret pairs and also the token access details. Now I would like to make calls to Twitter Rest API, using chrome Postman client.

How should I pass the customer key, secret, token etc details to the request? I have tried to pass them as headers and also tried to pass them by selecting OAuth1.0 option in postman client but I am getting errors:

{
  "errors": [
    {
      "code": 32,
      "message": "Could not authenticate you."
    }
  ]
}
like image 962
learner Avatar asked Aug 23 '15 20:08

learner


4 Answers

I know this is old, but in case anyone is still facing this issue, the following steps worked for me:

  1. In Authorization tab, select OAuth 1.0
  2. Enter your consumer key, consumer secret, access token and access token secret
  3. Enable “Add params to header” and “Auto add parameters”
  4. Send the request

enter image description here

I hope that helps.

like image 132
Juliana Chahoud Avatar answered Oct 21 '22 09:10

Juliana Chahoud


Juliana Chahoud's answer updated for 2018:

The add authorization data has been moved to the left column and requires you to select the drop down menu to change it to "Request Headers".

Postman 2018

like image 35
Nathaniel Ruiz Avatar answered Oct 21 '22 10:10

Nathaniel Ruiz


Postman creates 6 character nonce, Twitter needs 32-character Nonce. So you can use any random value, I used ABCDEFGHIJKLMNOPQRSTUVWXYZ123456 (length=32)

like image 7
Pratik Patil Avatar answered Oct 21 '22 09:10

Pratik Patil


You must not pick Add params to header (pick will failed) You don't need to care about Nonce

enter image description here

like image 6
Haha TTpro Avatar answered Oct 21 '22 10:10

Haha TTpro