-2

Getting Error 401 while sending the below request for stream api . however when i just try using curl with authorization header it works properly . Please advice what m doing wrong.

REQUEST
GET /1.1/statuses/filter.json HTTP/1.1
Accept: /
User-Agent: Qapla
Content-Type: application/x-www-form-urlencoded
Authorization: https://stream.twitter.com/1.1/statuses/sample.json?language=en&oauth_consumer_key=GuYuxjwY&oauth_nonce=u4a3R_n&oauth_signature_method=HMAC-SHA1&oauth_timestamp=153693&oauth_token=103405936-vfmrGkclVE8siUIF&oauth_version=1.0&oauth_signature=R2qVlT2aLVgi8SMA%3D
Host: stream.twitter.com

ERROR RESPONSE
HTTP/1.1
401
Authorization
Required
cache-control:
must-revalidate,no-cache,no-store
connection:
close
content-length:
266
content-type:
text/html
date:
Fri,
14
Sep
2018
15:19:31
GMT
server:
tsa
www-authenticate:
Basic
realm=“Firehose”
x-connection-hash:
cd3e38a2d55e0a8831776b96d862d3a2
VikramChopde
  • 203
  • 1
  • 4
  • 11

1 Answers1

1

The authorization header is invalid , it should not be a url , rather it should be some has kind of value , in case u have access to the API , you will find it in the API console

Sanjay
  • 127
  • 7
  • Thanks sanjay . Do you mean something like this Authorization: OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog", oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg", oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318622958", oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb", – VikramChopde Sep 14 '18 at 16:42
  • Thanks Sanjay . I modified the Request Message . It worked. – VikramChopde Sep 15 '18 at 13:32