I am trying the following command from my MAC terminal. I get 401Unauthorized error.
curl --request ‘POST’ ‘https://api.twitter.com/oauth/request_token’ --header ‘Authorization:OAuth oauth_consumer_key=“6jq5dNZcccoPbApAJ0sOaA”,oauth_signature_method=“HMAC-SHA1”,oauth_signature=“eqWxv6BIwyC%2FCf2Z6bH8XBB7X68%3D”,oauth_timestamp=“1362834122”,oauth_nonce=“c033fddcb6f94d9e841287a66b4867e1”,oauth_version=“1.0”’ --verbose
- About to connect() to api.twitter.com port 443 (#0)
- Trying 199.59.148.87… connected
- Connected to api.twitter.com (199.59.148.87) port 443 (#0)
- SSLv3, TLS handshake, Client hello (1):
- SSLv3, TLS handshake, Server hello (2):
- SSLv3, TLS handshake, CERT (11):
- SSLv3, TLS handshake, Server finished (14):
- SSLv3, TLS handshake, Client key exchange (16):
- SSLv3, TLS change cipher, Client hello (1):
- SSLv3, TLS handshake, Finished (20):
- SSLv3, TLS change cipher, Client hello (1):
- SSLv3, TLS handshake, Finished (20):
- SSL connection using RC4-SHA
- Server certificate:
- subject: C=US; ST=California; L=San Francisco; O=Twitter, Inc.; OU=Twitter Security; CN=api.twitter.com
- start date: 2012-05-02 00:00:00 GMT
- expire date: 2013-05-03 23:59:59 GMT
- subjectAltName: api.twitter.com matched
- issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at https://www.verisign.com/rpa ©09; CN=VeriSign Class 3 Secure Server CA - G2
- SSL certificate verify ok.
POST /oauth/request_token HTTP/1.1
User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
Host: api.twitter.com
Accept: /
Authorization:OAuth oauth_consumer_key=“6jq5dNZcccoPbApAJ0sOaA”,oauth_signature_method=“HMAC-SHA1”,oauth_signature=“eqWxv6BIwyC%2FCf2Z6bH8XBB7X68%3D”,oauth_timestamp=“1362834122”,oauth_nonce=“c033fddcb6f94d9e841287a66b4867e1”,oauth_version=“1.0”
< HTTP/1.1 401 Unauthorized
< cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
< content-length: 44
< content-type: text/html; charset=utf-8
< date: Tue, 19 Mar 2013 21:57:12 GMT
< expires: Tue, 31 Mar 1981 05:00:00 GMT
< last-modified: Tue, 19 Mar 2013 21:57:12 GMT
< pragma: no-cache
< server: tfe
< set-cookie: k=10.36.111.113.1363730232584964; path=/; expires=Tue, 26-Mar-13 21:57:12 GMT; domain=.twitter.com
< set-cookie: _twitter_sess=BAh7CCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7ADoPY3JlYXRlZF9hdGwrCBL1p4Q9AToHaWQiJWUx%250AMWY0NWM5MWVlYzY1ODU4ZThiN2IzNmVjNTVlOWM0–e2d4faf80b97568ae0bac4c2803fbdb121d2f44a; domain=.twitter.com; path=/; HttpOnly
< set-cookie: guest_id=v1%3A136373023258351499; Domain=.twitter.com; Path=/; Expires=Thu, 19-Mar-2015 21:57:12 UTC
< status: 401 Unauthorized
< vary: Accept-Encoding
< x-frame-options: SAMEORIGIN
< x-mid: 7b2c98b8a03683125ca89c7004442a112225190d
< x-runtime: 0.01764
< x-transaction: ca23aa9c648ac27f
<
- Connection #0 to host api.twitter.com left intact
- Closing connection #0
- SSLv3, TLS alert, Client hello (1):