Hi,
When there error like this or guzzle fails, try catch is not able to capture errors.
I am using PHP client library in google ads v6.
Type: GuzzleHttp\Exception\ClientException
Message: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:
{
"error": "invalid_grant",
"error_description": "Account has been deleted"
}
Filename: /google-ads-php/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
Line Number: 113
Thanks,
Hi,
Thank you for reaching out. “Account has been deleted” indicates that the account that you used to generate the refresh token has been deleted. You could recreate the OAuth2 credentials using a valid Google Ads account and try the API call again.
Thanks and regards,
Xiaoming, Google Ads API Team
|
||||||
Hi,
Thank you for reaching out. You could refer to this code snippet on how to handle the GoogleAdsException and ApiException. For the exceptions related to the Guzzle library, please refer to their documentation or reach out to the library owner to get further assistance.
Thanks and regards,
Xiaoming, Google Ads API Team