Hi Сергей,
The AuthorizationError.NO_CUSTOMER_FOUND
<https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.AuthorizationError.Reason#NO_CUSTOMER_FOUND>
error is occurring when you are passing an incorrect/non-existing client
customer ID on the request header of your transaction. With this, you may
try to confirm on your end if the client customer ID is existing. If you
can confirm that it is indeed existing and the error is still persisting,
kindly provide the client customer ID or provide the complete SOAP request
and response so I can further check.
If you haven't enable the SOAP logs yet, kindly enable it by following this
guide <https://github.com/googleads/googleads-php-lib#logging> for PHP
library supported by AdWords API.
Regards,
Ejay
Google Ads API Team
On 03/28/19 05:47:39 khomenko.m...@gmail.com wrote:
Hi. I have an account with access to Ads API and developer token, approved
and having basic access level.
In documentation it means, that i have an access to production account.
I have built an application to generating reports for campaigns, but i
can't auhtenticate user. API throws AuthorizationError.NO_CUSTOMER_FOUND
error.
I use PHP 7.1.14. Inside the $token i have a response from google oauth
page.
Here is how i do request for get campaigns list.
$oAuthCreds = (new OAuth2TokenBuilder())
->withClientId(App::CLIENT_ID)
->withClientSecret(App::CLIENT_SECRET)
->withRefreshToken($token->refresh_token)
->build();
$session = (new AdWordsSessionBuilder())
->withOAuth2Credential($oAuthCreds)
->withDeveloperToken('XXXXXXXXXXXXX')
->build();
$services = new AdWordsServices();
/** @var CampaignService $campaignService */
$campaignService = $services->get($session, CampaignService::class);
$selector = new Selector();
$selector->setFields(['Id', 'Name']);
$selector->setOrdering([new OrderBy('Name', SortOrder::ASCENDING)]);
$selector->setPaging(new Paging(0, 20));
/** @var CustomerService $customerService */
$customerService = $services->get($session, CustomerService::class);
try {
$campaignList = $campaignService->get($selector)->getEntries();
} catch (Throwable $e) {
echo $e->getMessage();
}
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
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/2583aba9-e4ab-4450-a621-b24cdf5b1d8e%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/2583aba9-e4ab-4450-a621-b24cdf5b1d8e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
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/18i79lg0000000010lsnco00149n8cz6smj0c1i6oo30c1g68qjee9l%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.