Hi,
I am trying to Link a google use account to Mcc acount
this is my code
$user = new AdWordsUser();
//$user->SetDeveloperToken($developerToken);
$user->SetOAuth2Info(array(
"client_id" => $clientId,
"client_secret" => $clientSecret
));
$code = $_REQUEST["code"];
$oAuth2Handler = $user->getOAuth2Handler();
// echo $oAuth2Handler->GetOAuth2AccessToken($authCode, $callbackUrl);
$user_info = $user->SetOAuth2Info(
$oAuth2Handler->GetAccessToken($user->GetOAuth2Info(), $code, $callbackUrl));
$oauthInfo = $user->GetOAuth2Info();
$customerService = $user->GetService("CustomerService");
$customer = $customerService->get();
// echo $customer->customerId; exit;
$user->SetClientCustomerId($customer->customerId);
$managedCustomerService =
$user->GetService('ManagedCustomerService', 'v201603');
// Create customer.
$customer = new ManagedCustomer();
$customer->name = 'Account #' . uniqid();
$customer->currencyCode = 'EUR';
$customer->dateTimeZone = 'Europe/London';
//$customer->email
// Create operation.
$operation = new ManagedCustomerOperation();
$operation->operator = 'ADD';
$operation->operand = $customer;
$operations = array($operation);
// Make the mutate request.
$result = $managedCustomerService->mutate($operations);
// print '<pre>';
$customer = $result->value[0];
But this error is getting
ManagedCustomerServiceError.NOT_AUTHORIZED @ operations[0]
Please help me