You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
hi
I want to check if an adword account id really
exist.
because, if I put an id of a real account I get a result, but if, for some reason,
I type a wrong id (by mistake), the server crushes… so I would like to prevent that…
Please help.
Tnx, Eyal.
Sreelakshmi Sasidharan (AdWords API Team)
unread,
May 11, 2017, 1:47:21 PM5/11/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi Eyal,
You could use CustomerService.getCustomers() without specifying the clientCustomerId in the request header. This should return all the accounts that the specific login/OAuth credentials has access to. If the account is a manager account, you could then use the MangedCustomerService to get all the client accounts under that manager account. This sample in Java can be referred for the second part of operation using ManagedCustomerService. Once you have the client customer id(s) that are valid, you could use those for subsequent API requests. Samples in other languages can also be found here.
If you attempt to make an API call with an incorrect clientCustomerId, the API will return the error : AuthenticationError.CUSTOMER_NOT_FOUND. If this operation is causing your application server to crash, you might want to review the error handling in your application to make sure this error is handled properly.
Please let me know if you have any further questions.