Add ad account using access token



How do I add a client ad account to my account programmatically using access token and not through twitter interface?
I have generated the access token through the 3-legged authorization and can access the account details using the accounts api but the getCampaign api is not fetching the campaign present in the client account. It gives an undefined result. Plus I was looking for a way to add the client account to the other client accounts I have accessed through twitter interface which can be seen under

Thanks in advance and happy new year!!


Hi, I’m not sure what you mean by “I have accessed through twitter interface” - if you mean you want to login to using credentials gotten through 3-legged auth I don’t think that’s going to work. The client needs to be the one that managed their account, and generally those sort of questions about how to interface with client and setup accounts should be fine to ping to your Program Manager contacts for Ads API team.

For understanding how to implement access token strategy, you can look at cases from SDKs:

Or install twurl and inspect how it stores the tokens in .twurlrc file while switching to use one as the current active. Your App ID also needs to be whitelisted to manage campaigns so please confirm that with your contact as well.