Hi all
I’m trying to use Twitter Ads API and having some difficulties when trying to use Ads API with a user that has multiple accounts.
I’m using Tweetinvi.
I have 2 users from which I’m trying to get data:
- User1, a user with a single account (advertiser account id: account_id1)
- User2, a user with multiple accounts (i.e. advertiser account id: account_id2).
I’m running the following commands, each time with the relevant user credentials:
/Authentication code for User1…/
var statuses = TwitterAccessor.ExecuteJsonGETQuery(“https://api.twitter.com/1.1/statuses/user_timeline.json”);
var accounts = TwitterAccessor.ExecuteJsonGETQuery(“https://ads-api.twitter.com/0/accounts/:account_id1”);
/Authentication code for User2…/
var statuses2 = TwitterAccessor.ExecuteJsonGETQuery(“https://api.twitter.com/1.1/statuses/user_timeline.json”);
var accounts2 = TwitterAccessor.ExecuteJsonGETQuery(“https://ads-api.twitter.com/0/accounts/:account_id2”);
The results are:
“statuses” contains the statuses of User1, as expected
"accounts" contains information about User1’s single account, as expected
“statuses2” contains the statuses of User2, as expected
"accounts2" is NULL
Why doesn’t the Ads API work with the User2, even though I supplied a valid account_id to the API URL?
What am I missing?
Thanks,
Alon