Ads-api doesn't work (only with multiple accounts for user)


#1

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:

  1. User1, a user with a single account (advertiser account id: account_id1)
  2. 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


#2

Hi @AlonDvirPlus500,

For us is easier if you share your request with twurl https://github.com/twitter/twurl due to the fact is common for all of us, for instance, I don’t know what kind of library or code are you ussing.

First of all, try with the second account (the one that has 2 advertiser accounts) the next call: “https://ads-api.twitter.com/0/accounts/” (It will be better if you use v1 Of ADS API https://ads-api.twitter.com/1/accounts/)

Share your results!


#3

Hello,

Tweetinvi has not yet been developed or been tested with the ads api.

I have been looking for a partner for a long time and if you’d like, you can contact me on GitHub or gitter and we can discuss how we could work together to build your solution.

Kind Regards,
Linvi