Account was not found error

api

#1

HI,
I’m receiving accounts list from the https://ads-api.twitter.com/1/accounts endpoint,
next I’m receiving campaigns for each account like
https://ads-api.twitter.com/1/accounts/18ce54ao864/campaigns?count=1000
it works well but couple days ago one of the accounts starts to return 403 error
{
“errors”: [
{
“code”: “NOT_FOUND”,
“message”: “Account 18ce54ao864 was not found”
}
],
“request”: {
“params”: {}
}
}

account has values
"approval_status": “ACCEPTED”,
“deleted”: false

Maybe someone faced similar issue, what could it be?

Thanks


#2

Hey @imkison,

Unfortunately I was not able to reproduce the issue. When making the same call, the response body returns the entire count of all campaigns for that account_id. Can you try making the same calls with twurl and ensure that you pass in the -t option to get the entire trace of the API call, and post the entire request and response bodies?

Thanks!


#3

Hey,
Wanted to keep this thread alive as this issue happens to us as well.

When requesting accounts we get the account id “18ce548n6vf” in the response, but when we try to request the campaigns for this account id:
https://ads-api.twitter.com/1/accounts/18ce548n6vf/campaigns
the response is a 403 error:
{“errors”:[{“code”:“NOT_FOUND”,“message”:“Account 18ce548n6vf was not found”}],“request”:{“params”:{}}}

The problem seems like a mixture in the tokens and accounts. This account is accessible by another twitter token we have, but not through this specific token. If that is really the case, then why we get this account id in the response to the accounts endpoint?

Thanks a lot!


#4

It looks like the account had deleted the permission to your app.

Could it be?

Could you check it?

Thanks!


#5

If my app doesn’t have the permissions at all to this account, should we get this id in the response of the “accounts” endpoint?
Because usually, as far as I’ve seen, when trying accessing an app which we have limited access to we get the “ACTION_NOT_ALLOWED” error. Are those errors have the same meaning?

Also, this specific account - “18ce548n6vf” - wasn’t used to be one the accounts under this token until a week ago, which caused the problem to occurred. And the most wired thing is that we see this behaviour in 4 different tokens, of different clients, and they all started quite at the same time.


#6

Okey.

I did some tests with my accounts and I think I’ve found the same bug.

The problem is this one:

If a client give access to your account, you will see it in your ‘accounts’ endpoint, but I don’t know why, if that client revokes that access, you continue viewing that campaing on ‘accounts’ endpoint, but if you try to reach any other endpoint you get the ‘NOT FOUND’ error.

I think this is the problem because in my ‘accounts’ endpoint I see a client that we don’t currently manage, and that I can’t see int the ads-ui. Also, I made some request to that account_id and I got the NOT_FOUND error.

Maybe @imit8me could give help on this.

Thanks!


#7

Hi,

just got access to dashboard and don’t see 18ce54ao864 in the accounts list.
So looks this account related to another (not sure how to call it properly) user/client.
Trying to figure out to who it belongs

Thanks


#8

So I think it’s what I’ve pointed before! :D[quote=“hector_borras, post:6, topic:77097”]
I did some tests with my accounts and I think I’ve found the same bug.

The problem is this one:

If a client give access to your account, you will see it in your ‘accounts’ endpoint, but I don’t know why, if that client revokes that access, you continue viewing that campaing on ‘accounts’ endpoint, but if you try to reach any other endpoint you get the ‘NOT FOUND’ error.

I think this is the problem because in my ‘accounts’ endpoint I see a client that we don’t currently manage, and that I can’t see int the ads-ui. Also, I made some request to that account_id and I got the NOT_FOUND error.

Maybe @imit8me could give help on this.

Thanks!
[/quote]


#9

@imit8me can you help us here? :slight_smile:


#10

@noa_hdr: It’ll take us some time to try to reproduce, but we’ll update this thread once we have more information.


#11

Great! thanks a lot!


#12

Thanks again, @noa_hdr and @hector_borras.

We reproduced this issue and, as Hector mentioned, when a handle revokes access, the account still shows up when making a request to the GET /1/accounts endpoint. We’ll investigate further.

Appreciate you all bringing this to our attention!


#13

@imkison, @noa_hdr, @hector_borras: We’ve deployed a fix for this issue. Advertising-enabled accounts that have revoked access to the authenticating user should no longer appear when the authenticating user makes requests to the GET /1/accounts endpoint.

Thanks again for taking the time to report this issue! Please consider marking this thread as solved.


#14

@juanshishido Great! Thank you!