apiaryio / api-blueprint

API Blueprint
https://apiblueprint.org
MIT License
8.64k stars 2.14k forks source link

Could not authenticate Twitter-API Oauth #354

Closed andrey-shostik closed 8 years ago

andrey-shostik commented 8 years ago

My config

FORMAT: 1A
HOST: https://api.twitter.com/1.1/

# mev-test
Polls is a simple API allowing consumers to view polls and vote in them.

## Show User Feed [/statuses/user_timeline.json]
+ Parameters
    + user_id (optional, number, `12345`) ... Set to `true` to remove instead of deactivate
    + screen_name (optional, string, `notario`) ... The screen name of the user for whom to return results for.

### /statuses/user_timeline.json [GET]
+ Request
    + Headers

            Authorization: OAuth oauth_consumer_key="ONru9tPq2h89sqU9uhjUxrWaU",oauth_token="722030522659115009-cYhbNFIjDSurhqnwIgfG19ghnYoLHF0",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1473438314",oauth_nonce="3a36b630ac126f68593fdbeab6b62be7",oauth_version="1.0",oauth_signature="WBnK6iLza%2B6%2BQtmSclkICZ9BBSk%3D"

+ Response 200 (application/json)

When try send request using apiary i get such response.

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

It's strangely because headers i copied from Twitter OAuth Tool also got success response using postman and curl .

curl --get 'https://api.twitter.com/1.1/statuses/user_timeline.json' --header 'Authorization: OAuth oauth_consumer_key="ONru9tPq2h89sqU9uhjUxrWaU", oauth_nonce="5b53a1c8d9cb138ff744d7a784333eaa", oauth_signature="ayfEpG9%2BfdVyR%2BMMvV9eWp%2BAGNI%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1473438314", oauth_token="722030522659115009-cYhbNFIjDSurhqnwIgfG19ghnYoLHF0", oauth_version="1.0"' --verbose

Help me please, what am I doing wrong ?

andrey-shostik commented 8 years ago

was incorrect token