Hi,
I’m having a trouble of POSTing scheduled tweets from the twitter app I develop for my client.
My client’s ads account is granted access in my ads account. Please see the “Screenshot 1”
Also I have created a paid campaign in my ads account with just USD 1$, just for testing for now. Please see “Screenshot 2” and “Screenshot 3”.
Then I tried to execute below API. And got the result correctly.
Requst:-
https://ads-api.twitter.com/10/accounts
Response:-
{“request”:{“params”:{}},“next_cursor”:null,“data”:[{“name”:“Tweetvio”,“business_name”:null,“timezone”:“Africa/Lagos”,“timezone_switch_at”:“2021-09-18T23:00:00Z”,“country_code”:“NG”,“id”:“18ce55foxxi”,“created_at”:“2021-09-20T11:47:13Z”,“updated_at”:“2021-10-05T15:36:46Z”,“industry_type”:null,“business_id”:null,“approval_status”:“ACCEPTED”,“deleted”:false},{“name”:“LasaNisaAds”,“business_name”:null,“timezone”:“Asia/Karachi”,“timezone_switch_at”:“2021-09-28T19:00:00Z”,“country_code”:“LK”,“id”:“18ce55frbi9”,“created_at”:“2021-09-28T14:39:22Z”,“updated_at”:“2021-10-11T06:39:32Z”,“industry_type”:“OTHER”,“business_id”:null,“approval_status”:“ACCEPTED”,“deleted”:false}]}
Then I tried to execute below API to POST a scheduled tweet. And it errored as below.
Request:-
https://ads-api.twitter.com/10/accounts/18ce55foxxi/scheduled_tweets?as_user_id=182328584&scheduled_at=2021-10-12T11:30:00&text=Test…
Error:-
{“errors”:[{“code”:“UNAUTHORIZED_ACCESS”,“message”:“This request is not properly authenticated”}],“request”:{“params”:{}}}
For both requests, I used the same authentication tokens.
18ce55foxxi is my client’s ads account id.
182328584 is the user_id of my twitter account “LasaNisa”
Please have a look and let me know why POST request gives this error.
Thanks,
Lasantha