Oauth tool, curl and winxp cmd line not a winning combination


I took the Curl output from OAuth Tool and made it work in WinXP cmd by reversing the single and double quotes and breaking up the header. Even after that, I get “Could not authenticate with OAuth.” I don’t know where to go from here. I am using a coldfusion and the library available for that uses basic auth so its unusable.

I might have to repost this, but my overarching goal is to post status updates for a group of water monitoring stations, each of which have their own Twitter account. Obviously they are not going to use a browser to allow my application so I don’t know what to do even after this part works.


set curl="D:\Program Files\Curl\curl.exe"
set Consumerkey=iYgSQrAYlrBtPNK02cSEBA
set Accesstoken=577131443-uvbixKrafQyJdTNCNrL2F2spJDBBJjKbeh8wGLQ
set header=-H="Authorization: OAuth
set header=%header% oauth_consumer_key=’%Consumerkey%'
set header=%header% , oauth_nonce='ff21f3d06fb9b344d8eba1f37bd82890’
set header=%header% , oauth_signature='DCAKMX6lUfuBaVoZCYH%2BqmbKbbk%3D’
set header=%header% , oauth_signature_method='HMAC-SHA1’
set header=%header% , oauth_timestamp=‘1337873249’
set header=%header% , oauth_token=’%Accesstoken%'
set header=%header% , oauth_version=‘1.0’"
set options=–insecure --verbose
%curl% --request “POST” --data “status=how+ya+doing%3F” %header% %options% --url https://api.twitter.com/1/statuses/update.xml

which yields:

Content-Length: 54
Content-Type: application/x-www-form-urlencoded

  • upload completely sent off: 54 out of 54 bytes
  • HTTP 1.0, assume close after body
    < HTTP/1.0 400 Bad Request
  • SSLv3, TLS alert, Client hello (1):
  • Closing connection #0
  • SSLv3, TLS alert, Client hello (1):

for which the web page says, "The request was invalid. An accompanying error message will explain why. This is the status code will be returned during rate limiting."  There is no accompanying error message to explain why.



Have you had any luck with this ?

I’m trying something similar and copied the curl line from the oauth tool added -k to get over SSL certificate error and swapped around and or removed quotes

curl -k --get https://api.twitter.com/oauth/request_token --header “Authorization: OAuth oauth_consumer_key=‘Y3bxBkjUOrnydSliCUXPg’, oauth_nonce=‘a525cdccda872a27007805c639e881d9’, oauth_signature=‘1WX%2BYJ5rsNWsmRjQ%2BB81VAyDxys%3D’, oauth_signature_method=‘HMAC-SHA1’, oauth_timestamp=‘1348825581’, oauth_token=‘757341968-VX14utPzGVKKA0tESLPfc8JubP1Jqala3ZZCMITX’, oauth_version=‘1.0’” --verbose

but still no luck

The ultimate goal is to do this with a HTTPS request from within our application but as I can’t even get this tool to work at the most basic command line level i’m a bit stuck !