Instantly share code, notes, and snippets.

Embed
What would you like to do?
○ → curl --request 'POST' 'https://upload.twitter.com/1.1/statuses/update_with_media.json' --header 'Authorization: OAuth oauth_consumer_key="e0BXaCbzc3GrPABMCj2w", oauth_nonce="4aa3d970395e954ce75832be55e0fd83", oauth_signature="Pwblc4xSF9Wtj3hopJZS1McjGMc%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1393448069", oauth_token="608424371-Ei6vojEXe1rfkAigLVkXF0eQaWoRRhEv4UdUgOrW", oauth_version="1.0"' --verbose -F "media[]=@Downloads/mjJq45c.jpg" -F "status=Test from cURL"
* Adding handle: conn: 0x7f8699803a00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7f8699803a00) send_pipe: 1, recv_pipe: 0
* About to connect() to upload.twitter.com port 443 (#0)
* Trying 199.16.156.117...
* Connected to upload.twitter.com (199.16.156.117) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_RC4_128_SHA
* Server certificate: upload.twitter.com
* Server certificate: VeriSign Class 3 Secure Server CA - G3
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> POST /1.1/statuses/update_with_media.json HTTP/1.1
> User-Agent: curl/7.30.0
> Host: upload.twitter.com
> Accept: */*
> Authorization: OAuth oauth_consumer_key="e0BXaCbzc3GrPABMCj2w", oauth_nonce="4aa3d970395e954ce75832be55e0fd83", oauth_signature="Pwblc4xSF9Wtj3hopJZS1McjGMc%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1393448069", oauth_token="608424371-Ei6vojEXe1rfkAigLVkXF0eQaWoRRhEv4UdUgOrW", oauth_version="1.0"
> Content-Length: 226083
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------05a93c21df85
>
< HTTP/1.1 100 Continue
< HTTP/1.1 401 Unauthorized
< content-length: 63
< content-type: application/json; charset=utf-8
< date: Wed, 26 Feb 2014 21:06:25 UTC
* Server tfe is not blacklisted
< server: tfe
< set-cookie: guest_id=v1%3A139344878528182722; Domain=.twitter.com; Path=/; Expires=Fri, 26-Feb-2016 21:06:25 UTC
< strict-transport-security: max-age=631138519
< Connection: close
<
* Closing connection 0
{"errors":[{"message":"Could not authenticate you","code":32}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment