Nilesh Nartam
Nilesh Nartam

Reputation: 296

Twitter API does not authenticate properly

I have used postman to test request with Twitter API (https://api.twitter.com/1.1/statuses/user_timeline.json), but it gives me

{"errors":[{"code":215,"message":"Bad Authentication data."}]}

My header is:

Authorization:OAuth oauth_consumer_key="MLcGSZNPmn2un5DKbtgnYi8JY",oauth_token="%20751004957898342400-YYpLg5dayAHVkaG47H9NVVkZiE7Z2bc",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1468092744",oauth_nonce="ABCDEFGHIJKLMNOPQRSTUVWXYZ123456",oauth_version="1.0",oauth_signature="fkf0NE2PmDLQZY%2BzMa7gQmA72kU%3D"

and postman auth setting is:

enter image description here

How can I solve this?

Upvotes: 1

Views: 842

Answers (2)

Rishi
Rishi

Reputation: 1

Make sure that you are providing the query parameters which are required.

I received the same error, 215 Bad Authentication Data when I was not providing the only required query parameter, the search string q, in the GetUsers call. But since I did not intend to search for any specific user, I resorted to the Streaming APIs.

Upvotes: 0

Parag Chaure
Parag Chaure

Reputation: 3015

Remove the space in

oauth_token="%20751004957898342400-YYpLg5dayAHVkaG47H9NVVkZiE7Z2bc"

it should be

oauth_token="751004957898342400-YYpLg5dayAHVkaG47H9NVVkZiE7Z2bc"

while sending request to twitter

Upvotes: 0

Related Questions