Changing specific tailored audience list


#1

Hello,

I want to change tailored audience.
See https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/tailored_audience_change
But I get UNAUTHORIZED error.
It is similar to Getting tailored audience list

First, upload audience list.

$ twurl -t -H ton.twitter.com /1.1/ton/bucket/ta_partner -X POST -A 'Content-Type
: text/plain' -A 'X-TON-Expires: Sat, 19 Dec 2015 04:03:03 GMT' -A 'Content-Length: 130' --data '5540dede521dd8014d1556ea891c65dc4936dcc5
621432a0e3a0ea8831c356f9\n6f81a509e7eba62f9b5e814d103600982299314669d4aaaaafc095a06a4a3097'
opening connection to ton.twitter.com:443...
opened
starting SSL for ton.twitter.com:443...
SSL established
<- "POST /1.1/ton/bucket/ta_partner HTTP/1.1\r\nContent-Type: text/plain\r\nX-Ton-Expires: Sat, 19 Dec 2015 04:03:03 GMT\r\nContent-Lengt
h: 130\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\nAuthorization: OAuth
 oauth_body_hash=XXXXXX, oauth_consumer_key=XXXXXX, oauth_nonce=XXXXXX, oauth_signature=XXXXXX, oauth_signature_method=\"HMAC-SHA1\", oauth_timesta
mp=\"1450411450\", oauth_token=XXXXXX, oauth_version=\"1.0\"\r\nConnection: close\r\nHost
: ton.twitter.com\r\n\r\n"
<- "5540dede521dd8014d1556ea891c65dc4936dcc5621432a0e3a0ea8831c356f9\\n6f81a509e7eba62f9b5e814d103600982299314669d4aaaaafc095a06a4a3097"
-> "HTTP/1.1 201 Created\r\n"
-> "connection: close\r\n"
-> "content-length: 0\r\n"
-> "content-type: text/plain\r\n"
-> "date: Fri, 18 Dec 2015 04:04:11 GMT\r\n"
-> "location: /1.1/ton/data/ta_partner/2857958864/IUzIO9TJbXwkl_w.txt\r\n"
-> "server: tsa_a\r\n"
-> "set-cookie: guest_id=v1%3A145041145173457423; Domain=.twitter.com; Path=/; Expires=Sun, 17-Dec-2017 04:04:11 UTC\r\n"
-> "strict-transport-security: max-age=631138519\r\n"
-> "x-connection-hash: 2aff77c90a008f24e5ce20c3e43873c0\r\n"
-> "x-content-type-options: nosniff\r\n"
-> "x-rate-limit-limit: 50\r\n"
-> "x-rate-limit-remaining: 48\r\n"
-> "x-rate-limit-reset: 1450412284\r\n"
-> "x-response-time: 35\r\n"
-> "x-tsa-request-body-time: 0\r\n"
-> "\r\n"
reading 0 bytes...
-> ""
read 0 bytes
Conn close

Next, change tailored audience.

$ twurl -H ads-api.twitter.com "/0/accounts/18ce53zfujv/tailored_audience_changes" -d "tailored_audience_id=z87q&operation=ADD&input_file_path=/1.1/ton/data/ta_partner/2857958864/IUzIO9TJbXwkl_w.txt"
{"errors":[{"code":"UNAUTHORIZED_CLIENT_APPLICATION","message":"The client application making this request does not have access to this API"}],"request":{"params":{}}}

How do I get the authentication ?

My authentification level is below.

$ twurl -H ads-api.twitter.com "/0/accounts/18ce53zfujv/authenticated_user_acc
ess"
{"data_type":"user_access","data":{"user_id":2857958864,"permissions":["AD_MANAGER","TWEET_COMPOSER"]},"request":{"params":{"account_id":"18ce53zfujv"}}}

Thanks.


#3

This error has occur continue.
What should I do?