Hello. I have google account ads account and g-suite account. On g-suite
account I have app to read ads data. I share ads customers from ads account
to g-suite account, but when I'm trying to get these customers data I get
access error.
When I filled out the form for developer token I received something like
this:
"The company you applied for already has an approved API token through
their Ads Manager (MCC) account ID {id}. in accordance with the Ads API
policy, we provide only one developer token per legal entity. If you would
like to receive contact information for a party with an already approved
developer token, please reply to this email indicating this."
I'm usind php SDK GoogleAds V5 and getting all clients with this methods:
$this->client = (new GoogleAdsClientBuilder())
->fromFile(config('google_ads.config_file'))
->withOAuth2Credential((new OAuth2TokenBuilder())
->fromFile(config('google_ads.config_file'))
->withRefreshToken($token)
->build())
->build();
...
$customerServiceClient = $this->client->getCustomerServiceClient();
$accessibleCustomers = $customerServiceClient->listAccessibleCustomers();
When i iterate throw array of customers to have names I get:
foreach ($accessibleCustomers->getResourceNames() as $customerResourceName)
{
$customer =
CustomerServiceClient::parseName($customerResourceName)['customer'];
$current_customer =
$customerServiceClient->getCustomer(ResourceNames::forCustomer($customer));
$name = $current_customer->getDescriptiveName();
$result = [
'name' => $name,
'id' => intval($customer)
];
array_push($accessibleCustomerIds, $result);
}
Exception:
{
"message": "The caller does not have permission",
"code": 7,
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "google.ads.googleads.v5.errors.googleadsfailure-bin",
"data": "<Unknown Binary Data>"
},
{
"@type": "grpc-status-details-bin",
"data": "<Unknown Binary Data>"
},
{
"@type": "request-id",
"data": "51xDV-nU3NsoLzScC1bU5g"
}
]
}
Is it somehow related to the developer token? If so, how to get access.
Thank.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/4db9869d-fe3e-47cc-ac64-3207641223e2n%40googlegroups.com.