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.