Hello i have this issue.
try{
// Generate a refreshable OAuth2 credential for authentication.
$oAuth2Credential = (new OAuth2TokenBuilder())
->fromFile()
->build();
// Construct an API session configured from a properties file and
the OAuth2
// credentials above.
$session = (new AdWordsSessionBuilder())
->fromFile()
->withOAuth2Credential($oAuth2Credential)
->build();
$result = $this->EstimateKeywordTraffic(new AdWordsServices(),
$session);
}
catch (ApiException $apiException) {
print_r($apiException);
}
below my error:
Fatal error: Uncaught Google\AdsApi\AdWords\v201802\cm\ApiException:
[RateExceededError <rateName=RATE_LIMIT, rateKey=null, rateScope=ACCOUNT,
retryAfterSeconds=30>] in
/home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:39
Stack trace: #0
/home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php(39):
ReflectionClass->newInstanceArgs(Array) #1
/home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(165):
Google\AdsApi\Common\Util\Reflection->createInstance('Google\\AdsApi\\A...',
Array) #2
/home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(130):
Google\AdsApi\Common\AdsSoapClient->parseApiExceptionFromSoapFault(Object(SoapFault))
#3 /home/refleadfem/ in
/home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php
on line 39
i wrote use Google\AdsApi\AdWords\v201708\cm\ApiException;
but it does not work.
how to catch this execption thank you for helping me.
my goal is to slow down calls as soon as I catch the exception
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/87329f48-1377-4165-b344-ff7397ce4414%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.