I’m trying to use some of the Twitter Ads API in postman. I have tokens/keys set up. When I attempt to execute a query I see in the response:

{
“errors”: [
{
“code”: “NOT_FOUND”,
“message”: “Account 22029074 was not found”
}
],
“request”: {
“params”: {}
}
}

The account is there as I can see it on the project page…
The query is:
//GET
//https://ads-api.twitter.com/{{version}}/accounts/{{account_id}}/tailored_audiences

The version is ‘10’

The account_id is a Base 36 format. Your application can query which account IDs the credentials can access using the GET /10/accounts endpoint. Can you verify one of these account IDs is being used by the above postman request.

Using that query:

//https://ads-api.twitter.com/10/accounts/

{
“request”: {
“params”: {}
},
“next_cursor”: null,
“data”:
}

It would appear that the user credentials do not have access to any Twitter ads accounts. I would recommend checking the GET accounts/:account_id/authenticated_user_access to ensure that user has access to an ads account.

The account_id I have is: 22029074

Is that the value we use in the api call path as in:

##GET accounts/:account_id/authenticated_user_access

So, it would be:

GET accounts/22029074/authenticated_user_access

A call to:

GET https://ads-api.twitter.com/10/accounts/

returns:

{
“request”: {
“params”: {}
},
“next_cursor”: null,
“data”:
}

I’ve got all my keys/tokens set up in postman

The empty results from the accounts endpoint indicates the user does not have access to any Twitter ads accounts. The following document describes access roles for Twitter ads accounts:

It looks like the project page says I have access to ads api?

The user would need to have access to an account on https://ads.twitter.com/. The account_id 22029074 doesn’t exist. Could you confirm where you obtained this from?

I got an email from Ads API Team back on Oct 6, 2021:

Subject: Twitter Ads API Re: ADS API Account Status

Hi Roger,

Thanks for your email. Your app 22029074 is approved for access as of 10/1/21.

Please check your spam folder for the original confirmation and add adsapi-program@twitter.com to your email contacts to ensure you continue to receive future emails.

Get started on the Ads API here.

We look forward to seeing what you build on the Twitter Ads API! Let us know if you have any questions.

Twitter Ads API Team

Twitter users must apply for access to obtain a Twitter Ads account. Separately, API developers must apply to have their application granted access to use the Twitter Ads API. The above indicates that the app was granted access but the user account doesn’t have access to a Twitter Ads account. You will need to sign up for access here or use the sandbox environment.

We have an Audience Designer app that needs to POST (upload). device ids and/or emails for custom audiences. It is my understanding that we would need to make api calls from our app like:

  1. Create placeholder custom audience

POST accounts/:account_id/custom_audiences

And it is my understanding the account id filled in the API call would be our app id: 22029074

  1. Add emails and/or device ids

POST accounts/:account_id/custom_audiences/:custom_audience_id/users

If the app was granted access - should we be able to use these apis from our app?

I fell we are missing something here… Is there a chat or a person we can talk to?

Trying to use the sandbox environment:

curl -X POST “https://ads-api-sandbox.twitter.com/10/accounts
{“errors”:[{“code”:“UNAUTHORIZED_ACCESS”,“message”:“This request is not properly authenticated”}],“request”:{“params”:{}}}

I have all the required tokens.

I also authorized as follows:

twurl authorize --consumer-key --consumer-secret
Go to https://api.twitter.com/oauth/authorize?… and paste in the supplied PIN
7133708
Authorization successful

Tried using twurl:

twurl -H “https://ads-api-sandbox.twitter.com” “/10/accounts”
{“request”:{“params”:{}},“next_cursor”:null,“data”:[]}