Https:// return 401 unauthorized


I am trying to connect to Twitter though oAuth.I am making a POST request to the API

Here is is example of my Base signature string


I used the tool to verify my base signature.

Here is the corresponding header

OAuth oauth_callback=“”,oauth_consumer_key=“6jq5dNZcccoPbApAJ0sOaA”,oauth_nonce=“N2ZiMjViYzhlMDUxNDIyZWIwYjQ4NmU0ZjM1MDg4NTY=”,oauth_signature_method=“HMAC-SHA1”,oauth_signature=“7ney2RxElbHUl2t1Jnz57pQpmFs%3D”,oauth_timestamp=“1362843354”,oauth_version=“1.0”

I tried the following command in my MAC terminal

curl --request ‘POST’ ‘’ --header ‘Authorization: OAuth oauth_callback=“”,oauth_consumer_key=“6jq5dNZcccoPbApAJ0sOaA”,oauth_nonce=“N2ZiMjViYzhlMDUxNDIyZWIwYjQ4NmU0ZjM1MDg4NTY=”,oauth_signature_method=“HMAC-SHA1”,oauth_signature=“7ney2RxElbHUl2t1Jnz57pQpmFs%3D”,oauth_timestamp=“1362843354”,oauth_version=“1.0”’ --verbose

And i get 401 unauthrized error. I tried to set the oauth_callback =“oob” but I still get the same error.


Have you verified your timestamp is in sync with Twitter’s? On the step where you create your signature, are you using a “composite key” of your consumer secret and the “null” oauth token secret (example: “2dq5dZNdccoPcDpDJ0sOaJ&”)


Hi Taylor,
Facing same issue,
I already mailed you request_token url, with valid parameters.
Please suggest.
Kiran K


I am facing the same problem error Error 401 Unauthorized which was working fine.I am htting the url curl --get -k ‘’ --data ‘follow=145125358’ --header ‘Authorization: 1OAuth oauth_consumer_key=“LIiCC1QQsUufkwHLLt3ZDA”, oauth_nonce=“b1177c3bf28b445a84ccce612c7db1f2”, oauth_signature=“Azb9avx7p5Q9pObvs%2BkV5mQla34%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1379411748”, oauth_token=“262090009-QPDO59nD5jQwOytzB7ZlVfEHuau64sdpCXTkbPNE”, oauth_version=“1.0”’;

this was working fine some time back but now its generating error i have not not make any changes in the app.


What have you tried so far to probe what may have gone wrong? Is the system clock correct on your machine? Can you use the access token to make other API requests?