Having the same problem at my end. Here’s the header I used to send for the post
POST https://ton.twitter.com/1.1/ton/bucket/ta_partner HTTP/1.1
Host: ton.twitter.com
User-Agent: Alche
Accept-Encoding: identity,gzip
Content-Type: text/csv
Content-Length: 6630
X-TON-Expires: Tue, 11 Aug 2015 00:20:05 GMT
Authorization: OAuth oauth_consumer_key=“oauth_consumer_key”, oauth_nonce=“oauth_nonce”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1438647605”, oauth_version=“1.0”, oauth_token=“oauth_token”, oauth_signature="oauth_signature"
Connection: Close
Tested on both twurl and ton-upload as well, got the same 400 bad request response. Here’s the trace req/log from ton_upload
Uploading email.hash.csv (0 KB) as text/comma-separated-values via TON API
opening connection to ton.twitter.com:443…
opened
starting SSL for ton.twitter.com:443…
SSL established
<- “POST https://ton.twitter.com/1.1/ton/bucket/ta_partner HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: /\r\nUser-Agent: OAuth gem v0.4.7\r\nContent-Type: text/comma-separated-values\r\nContent-Length: 130\r\nX-Ton-Expires: Sun, 09 Aug 2015 00:44:39 GMT\r\nAuthorization: OAuth oauth_body_hash=“hash”, oauth_consumer_key=“oauth_consumer_key”, oauth_nonce=“mgu7M4HBTjVCDbLvur3N6jNAxgOd62LG67krUir4Q”, oauth_signature=“USdDiwo%2Fb5k7SRBxWfqR3BkFmhk%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1438649079”, oauth_token=“oauth_token”, oauth_version=“1.0”\r\nConnection: close\r\nHost: ton.twitter.com\r\n\r\n”
<- “eabb220e1c2e34a53294b9868f8cff4cd21d36c1a0ec0f9bef3953a3f0ecfe5b\nf505796aac5fb17c05a95b32dbfc6cea198437714acc84b6d2caf1a22cca6e22\n”
-> “HTTP/1.1 400 Bad Request\r\n”
-> “cache-control: no-cache\r\n”
-> “connection: close\r\n”
-> “content-length: 0\r\n”
-> “date: Tue, 04 Aug 2015 00:44:39 GMT\r\n”
-> “server: tsa_a\r\n”
-> “set-cookie: guest_id=v1%3A143864907988003859; Domain=.twitter.com; Path=/; Expires=Thu, 03-Aug-2017 00:44:39 UTC\r\n”
-> “strict-transport-security: max-age=631138519\r\n”
-> “x-connection-hash: 87bbe33196dae3a5236e007446119ce9\r\n”
-> “x-rate-limit-limit: 50\r\n”
-> “x-rate-limit-remaining: 46\r\n”
-> “x-rate-limit-reset: 1438649310\r\n”
-> “x-response-time: 10\r\n”
-> “x-tsa-request-body-time: 3\r\n”
-> "\r\n"
reading 0 bytes…
-> ““
read 0 bytes
Conn close
File stored at
Downloading the file
RestClient.get “https://ton.twitter.com/1.1/ton/bucket/ta_partner/”, “Accept”=>”/; q=0.5, application/xml”, “Accept-Encoding”=>“gzip, deflate”, “Authorization”=>"Bearer "
/# => 400 BadRequest | 0 bytes
/var/lib/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in return!': 400 Bad Request (RestClient::BadRequest) from /var/lib/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:495:inprocess_result’
from /var/lib/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in block in transmit' from /usr/lib/ruby/2.1.0/net/http.rb:853:instart’
from /var/lib/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in transmit' from /var/lib/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:176:inexecute’
from /var/lib/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in execute' from ./ton_upload:233:inget_from_ton’
from ./ton_upload:357:in execute' from ./ton_upload:401:inmain’
from ./ton_upload:404:in `’