Retireve info when the account is suspended

40 views
Skip to first unread message

Κωστας Μαυρογαλος

unread,
Jun 9, 2023, 6:13:40 AM6/9/23
to Google Ads API and AdWords API Forum
Greetings,
I'm attempting to query the API about whether an account is suspended or not(V13 and using PHP, btw).
So far, attempting to query the API with the id of a suspended account returns a Fault and more specifically a Status code:7 Details: The caller does not have permission and my script exits without any chance of processing the request.
Is there a way for someone to retrieve that piece of information? Whether an account is suspended or not, I mean.

If it helps, the Fault happens in this line:  $customer = $googleAdsServiceClient->search($customerId, $query)->getIterator()->current()->getCustomer();

Thank you in advance

Google Ads API Forum Advisor

unread,
Jun 14, 2023, 12:38:50 PM6/14/23
to kostasma...@gmail.com, adwor...@googlegroups.com

Hello,

Welcome to Google Ads API Support team. Thank you for reaching out to us.

With regards to your concern, you may retrieve the status of an account by using the API customer reporting (https://developers.google.com/google-ads/api/fields/v14/customer) and querying for its status. You may try the below query and see if this helps your concern.

SELECT customer.status FROM customer


If the issue persist, kindly provide the complete request and response logs with request id and request header generated on your end.

Note that these logs can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. You may check here (https://developers.google.com/google-ads/api/docs/best-practices/logging#client_library_logging) and click your client library for the specific guideline to enable it.

For REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include the HTTP response headers in the output.

Links to the highlighted words above:


You may send the requested details privately via “Reply To Author” option. If that option is not available to you, send it directly to googleadsa...@google.com instead, and let us know here once it is provided.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2mBAyX:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages