Error while updating tailored audience using tailored_audience_changes api

tailored-audiences

#1

I am uploaded a list of users 5k email addresses using TON api and get success response https://ton.twitter.com/1.1/ta_partner/135099564/xCZiJg05jH8pbWu.csv. Whenever I tried to call another api tailored_audience_changes using parameter like tailored_audience_id,operation=ADD and input_file_path=’/1.1/ta_partner/135099564/xCZiJg05jH8pbWu.csv’ and i got response like ‘UNAUTHORIZED_ACCESS’ .But authentication is perfect . What do I do ? please help me.

Thanks in advance


#2

@ShivaKu86671804: Thanks for the question. Please provide a full example (requests and responses) so that we can try to identify what might be going on. In addition, please see our Version 4 announcement for details on our new audiences API.


#3

Thank you for your response
request:::
let obj={
tailored_audience_id:‘2pp2k’,
operation:‘ADD’,
input_file_path:’/1.1/ta_partner/135099564/xCZiJg05jH8pbWu.csv’
}
Twitter.post(‘https://ads-api.twitter.com/3/accounts/18ce54rg93w/tailored_audience_changes’,obj
,function(err,body,bachresp){
if(err) return callback(err,null);
console.log(body);
});
response :::
{ errors:
[ { code: ‘UNAUTHORIZED_ACCESS’,
message: ‘This request is not properly authenticated’ } ],
request: { params: {} } }

Thanks in advance