How to make calls to Twitter API using Postman client

后端 未结 9 1933
夕颜
夕颜 2020-12-13 16:48

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 Tw

相关标签:
9条回答
  • 2020-12-13 17:32

    For me, Postman created 11 character Nonce. I got the correct Twitter API response with the 11 character Nonce.

    0 讨论(0)
  • 2020-12-13 17:34

    After following the accepted answer, make sure there are no empty spaces at the end of the token/secret key. Otherwise, it will throw the same error Could not authenticate you.

    0 讨论(0)
  • 2020-12-13 17:35

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

    0 讨论(0)
  • Add authorization data to "Request Headers"

    Example Twitter API: https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=snap

    This will generate the Authorization header. Make sure this has been generated.

    Result

    [
        {
            "created_at": "Wed Mar 01 19:37:16 +0000 2017",
            "id": 837023955454201857,
            "id_str": "837023955454201857",
            "text": "RT @yoda: other things @snap has potentially worked on:\n\ntinker toys\nbaseball cards\nonesies\ntaco tosser\nshrunken christmas tree\nwalkie talk…",
            "truncated": false,
            "entities": {
                "hashtags": [],
                "symbols": [],
                "user_mentions": [
                    {
                        "screen_name": "yoda",
                        "name": "drew olanoff",
    ...
    
    0 讨论(0)
  • 2020-12-13 17:37

    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

    I hope that helps.

    0 讨论(0)
  • 2020-12-13 17:41

    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".

    0 讨论(0)
提交回复
热议问题