I am Facing this Error Can Any One Help Me Why This error Occur On API response how i can Grant The Access to Send the Invitation to customer account through API?
[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'']
$managerCustomerID = 3435423432;
$oAuth2Credential = (new OAuth2TokenBuilder())
->withClientId(CLIENT_ID)
->withClientSecret(CLIENT_SECRET)
->withRefreshToken($UserRefreshToken)
->build();
$soapSettings = (new SoapSettingsBuilder())
->disableSslVerify()
->build();
$session = (new AdWordsSessionBuilder())
->withDeveloperToken(DEVELOPERTOKEN)
->withOAuth2Credential($oAuth2Credential)
->withSoapSettings($soapSettings)
->withClientCustomerId($CustomerID)
->build();
$adWordsServices = new AdWordsServices();
$ManagedCustomerService = $adWordsServices->get($session, ManagedCustomerService::class);
$operations = [];
$ManagedCustomerLink = new ManagedCustomerLink();
$ManagedCustomerLink->setClientCustomerId($CustomerID);
$ManagedCustomerLink->setLinkStatus('PENDING');
$ManagedCustomerLink->setManagerCustomerId($managerCustomerID);
$operation = new LinkOperation();
$operation->setOperand($ManagedCustomerLink);
$operation->setOperator('ADD');
$operations = [$operation];
try {
$result = $ManagedCustomerService->mutateLink($operations);
echo "Invite sent";
echo "<pre>";
print_r($result);
} catch (Exception $e) {
echo $e->getMessage();
}
Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@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/dd30e4c5-4fee-4321-8be8-b1d229468782%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
I have the Basic access in my MCC account. Can Basic Access MutateLink and send invitation to customer through API?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@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/2fecfca9-f47e-4fe6-930e-807ed86a0c99%40googlegroups.com.