Account was not found

python
api

#1

Hi, I got the ads api access granted email. Which suggests that I had to provide App ID (14827068) and the Ads account is linked to.

l even tried “Test OAuth” button on App; It just refreshes the page. Along side with that, I tried twurl application to test authorisation, it works. But it does not list out all the accounts under that app.

I am using official twitter-ads api for python.

Any help is appreciated.

Thanks!


#2

Hey @j61686519851894

Can you please provide the exact request and response bodies of the request using twurl, along with the actual versus expected output?

Thanks!


#3

~ $ twurl accounts
j61686519851894
customer key I have REDACTED (default)

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

I am expecting ads account information under the second query (please correct me if I’m not doing something right)

Thanks!


#4

Hey @j61686519851894

It looks like you’re using the sandbox APIs, is that the intended use case here?

If so, you need to first create an Ads account using the POST call, like so:

twurl -H ads-api-sandbox.twitter.com "/3/accounts" -X POST | jq .
{
  "data": {
    "name": "Sandbox account for @imit8me",
    "timezone": "America/Los_Angeles",
    "timezone_switch_at": null,
    "id": "gq1d22",
    "created_at": "2018-04-05T18:33:40Z",
    "salt": "1dbf4655603e9623b060f8eff57984de",
    "updated_at": "2018-04-05T18:33:40Z",
    "industry_type": null,
    "approval_status": "ACCEPTED",
    "deleted": false
  },
  "request": {
    "params": {}
  }
}

Thanks!


#5

sent you a private message, not sure if it’s ok to share company account details here