1
votes

I have use the 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

please suggest me the way how can i solve it.

Thanks in advanced.

2
remove the space in oauth_token="%20751004957898342400-YYpLg5dayAHVkaG47H9NVVkZiE7Z2bc" it should be oauth_token="751004957898342400-YYpLg5dayAHVkaG47H9NVVkZiE7Z2bc" while sending request to twitter - Parag Chaure

2 Answers

0
votes

Remove the space in

oauth_token="%20751004957898342400-YYpLg5dayAHVkaG47H9NVVkZiE7Z2bc"

it should be

oauth_token="751004957898342400-YYpLg5dayAHVkaG47H9NVVkZiE7Z2bc"

while sending request to twitter

0
votes

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.