Tailor audiences upload and TON


Hi everybody, I want to check the flow of uploading tailored audiences with TON.
Supuse I want to upload two users ID called U1 and U2.First I should should hash each twitter id with SHA256, so each id would be HASH1 for U1 and HASH2 for U2. Then , assuming that I’m using rails with OAuth gem, I do the POST method:

h=access_token.post(“https://ton.twitter.com/1.1/ton/bucket/ta_partner","#{HASH1}, #{HASH2}”, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘3’, ‘X-TON-Expires’ => “#{(Time.now + 102460*60).httpdate}” })

Then I take the location from the response.
Is that flow correct? Essentially is that the correct way to upload the hashed data?

Thank you.


@prueba88888 have you seen our Tailored Audiences documentation? It’s very detailed, taking you through step by step on what you need to do.

On the file data side of things, this part of the docs is particularly helpful.

You should also check out https://github.com/twitterdev/ads-platform-tools where you can find some sample code in Python and Perl on how to hash data for tailored audience uploads.