RE: Always hit the RateExceededError

2020-04-14 Thread Google Ads API Forum Advisor Prod
Hi Zafar,

Thank you for getting back to us. My concern is whether you have others using 
your developer token as well, in which you can hit the limit if there are other 
users making calls to your developer token (if you've shared this token with 
other manager accounts). Every Google Ads manager account signed up to use 
AdWords API has a single developer token, and every request you make is most 
likely associated with that developer token. If the combined QPS for all client 
requests using the same developer developer token exceeds a certain rate limit, 
then you will encounter this error. Could you please recheck if anyone else is 
using this token to make the API calls? If you're still receiving this error, 
could you please share the complete API SOAP logs using Reply privately to 
author option to investigate further?

Thank you,
Bryan, Google Ads API Team
ref:_00D1U1174p._5001UZXyxq:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/kgklB0Q8SL8R00wRQWzfsZS9iU-T75_ukwKQ%40sfdc.net.


Re: Always hit the RateExceededError

2020-04-14 Thread Zafar Kaxarov

Hi, Bryan! Thank you for reply. 

I had read about account and developer token limits. But in first photo, 
you can see than during 30 days throught my developer token made 1,166 
requests. But I should hit Operations Per Day error when I make more than 
1,000 requests per day.
There is also another problem, when I hit this error, I save $error->
getRetryAfterSeconds() and not making request untill this time (usually it 
is 24 hours). After this time(24 hours) I continue making request to Ads 
API and hit the same error and must wait 24 hours again. And this is the 
circle which lasts continuosly. 

Please help me, how can I fix the error.

Thank you, 
Zafar Kakharov. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/fac70898-6ccc-4210-a66e-825fd2ccbfaf%40googlegroups.com.


RE: Always hit the RateExceededError

2020-02-21 Thread Google Ads API Forum Advisor Prod
Hi Zafar,

Thank you for reaching out to us. I see you’re encountering a 
RateExceededError(Operations Per Day) for Basic Level Access. This happens when 
you hit 10,000 operations per day or 1,000 requests per day on your developer 
token. Could I ask if you have other manager accounts or other users using your 
developer token as well? If multiple users make requests to the API using the 
same developer token, you might encounter the daily operations limit. If not, 
could you please send me your SOAP request and response logs where this error 
occurs?

Thank you,
Bryan, Google Ads API Team
ref:_00D1U1174p._5001UV1n1V:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0XcC30Q62IVM00sehzZx6yQJ-7JsvEewsMMQ%40sfdc.net.


Always hit the RateExceededError

2020-02-20 Thread Zafar Kaxarov

Hello! 

My developer token - tt-edFWwoiAxym9mInBh5w

Base level access

Client ID - 
153150666737-5avm1rl87a1vetj4an9m4p34n516efju.apps.googleusercontent.com

I always get an RateExceededError(OperationsPerDay) error despite the fact 
that I make a few requests in the Google AdWords API during the day. 

I can not understand how can I fix this error. 

Here is my code example, where I make a calls to AdWords API: 

// Check API restriction
if ($checkRestriction) {
if ($adWordsParams->retry_after > 0) {
if ((time() - $adWordsParams->last_requested_at) < 
$adWordsParams->retry_after) {
return $result;
}
}
}

try {
// Config
$conf = new Configuration([
'ADWORDS' => [
'developerToken' => $developerToken,
'clientCustomerId' => $adWordsParams->customer_id,
],
'OAUTH2' => [
'clientId' => $clientId,
'clientSecret' => $clientSecret,
'refreshToken' => $adWordsParams->oauth_refresh_token
],
]);
// Credentials
$oAuth2Credential = (new OAuth2TokenBuilder())->from($conf)->build();
// Session
$session = (new 
AdWordsSessionBuilder())->from($conf)->withOAuth2Credential($oAuth2Credential)->enablePartialFailure()->build();

$adWordsServices = new AdWordsServices();
/** @var AdsSoapClient $adWordsService */
$adWordsService = $adWordsServices->get($session, $service);
$result = $adWordsService->$method($params);

if ($checkRestriction) {
$adWordsParams->last_requested_at = time();
$adWordsParams->retry_after = 0;
$adWordsParams->save();
}
} catch (ApiException $e) {
foreach ($e->getErrors() as $error) {
if ($error instanceof RateExceededError) {
$adWordsParams->retry_after = $error->getRetryAfterSeconds();
$adWordsParams->save();
LogHelper::error($shopID, '[AdWordsApiHelper запрос]: ' . 
$error->getApiErrorType() . ' - ' . $error->getErrorString() . ' - ' . 
$error->getRateName() . ' - ' . $error->getReason(), 
LogHelper::CATEGORY_ADWORDS);
} else {
LogHelper::error($shopID, '[AdWordsApiHelper запрос]: ' . 
$error->getApiErrorType() . ' - ' . $error->getErrorString(), 
LogHelper::CATEGORY_ADWORDS);
}
}

$result = null;
}

return $result;


I check the RateExeedError and not make any requests to API, while it is no 
time.

Please, understand what I am doing wrong? 

Where in console.google.com can I check, how many requests are nade from my 
developer token through my project?

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/31585be4-3706-4b7b-af2f-e0018d48450e%40googlegroups.com.