Extending invitations returns ManagedCustomerServiceError.NOT_AUTHORIZED error code

85 рдмрд╛рд░ рджреЗрдЦрд╛ рдЧрдпрд╛
рдирд╣реАрдВ рдкрдврд╝реЗ рдЧрдП рдкрд╣рд▓реЗ рдореИрд╕реЗрдЬ рдкрд░ рдЬрд╛рдПрдВ

zemen

рдирд╣реАрдВ рдкрдврд╝реА рдЧрдИ,
16 рдордИ 2018, 5:29:01 pm16/5/18
рдИрдореЗрд▓ рдкрд╛рдиреЗ рд╡рд╛рд▓рд╛ AdWords API and Google Ads API Forum
Hi,

I'm trying to link a customer to my MCC account through my website services.
Here the PHP code:
// Generate a refreshable OAuth2 credential for authentication.
$oAuth2Credential = (new OAuth2TokenBuilder())
┬а ┬а ->withClientId(self::MANAGER_CLIENT_ID)
┬а ┬а ->withClientSecret(self::MANAGER_CLIENT_SECRET)
┬а ┬а ->withRefreshToken(self::MANAGER_REFRESH_TOKEN)
┬а ┬а ->build();

// Construct an API session configured from a properties file and the OAuth2
// credentials above.
$session = (new AdWordsSessionBuilder())
┬а ┬а ->withOAuth2Credential($oAuth2Credential)
┬а ┬а ->withDeveloperToken(self::MANAGER_DEV_TOKEN)
┬а ┬а ->withClientCustomerId(self::MANAGER_CLIENT_CUSTOMER_ID)
┬а ┬а ->build();

$adWordsServices = new AdWordsServices();

/**
┬а* @var ManagedCustomerService $managedCustomerService
┬а*/
$managedCustomerService = $adWordsServices->get($session, ManagedCustomerService::class);

$linkOp = new LinkOperation();
$link = new ManagedCustomerLink();

$link->setClientCustomerId(self::CLIENT_CID);
$link->setLinkStatus(LinkStatus::PENDING);
$link->setManagerCustomerId(self::MANAGER_CLIENT_CUSTOMER_ID);
$linkOp->setOperand($link);
$linkOp->setOperator(Operator::ADD);
$mutateLinkResults = $managedCustomerService->mutateLink([$linkOp]);
return $mutateLinkResults;

please help :)

Luis Xander Talag (AdWords API Team)

рдирд╣реАрдВ рдкрдврд╝реА рдЧрдИ,
17 рдордИ 2018, 12:04:34 am17/5/18
рдИрдореЗрд▓ рдкрд╛рдиреЗ рд╡рд╛рд▓рд╛ AdWords API and Google Ads API Forum
Hi Zemen,

To further investigate this, could you provide the complete SOAP request and response logs when you encountered the error? Also, could you provide your email address that is associated to your AdWords account? Please reply via┬аReply privately to author.

Thanks and regards,
Luis
AdWords API Team

zemen

рдирд╣реАрдВ рдкрдврд╝реА рдЧрдИ,
17 рдордИ 2018, 10:54:43 am17/5/18
рдИрдореЗрд▓ рдкрд╛рдиреЗ рд╡рд╛рд▓рд╛ AdWords API and Google Ads API Forum
Hi Luis,

my bad. The oauth token was created with access_type = online. So the token was expired.
Now everything is working as expected.

One more questione:
is there a way to turn off the email alert to the client┬аaccount to be managed?

Thanks in advance

Luis Xander Talag (AdWords API Team)

рдирд╣реАрдВ рдкрдврд╝реА рдЧрдИ,
17 рдордИ 2018, 10:50:33 pm17/5/18
рдИрдореЗрд▓ рдкрд╛рдиреЗ рд╡рд╛рд▓рд╛ AdWords API and Google Ads API Forum
Hi Zemen,

I'm glad that your issue has been resolved. Regarding the email alert, I believe you could configure that through the AdWords UI by navigating to┬аTools, billing, and settings┬аicon┬а┬а> Preferences > NOTIFICATIONS┬аtab or if you are using the old UI, click the┬аgear icon┬а┬а>┬аAccount settings > Notifications Settings. Hope this helps.

zemen

рдирд╣реАрдВ рдкрдврд╝реА рдЧрдИ,
18 рдордИ 2018, 12:24:12 pm18/5/18
рдИрдореЗрд▓ рдкрд╛рдиреЗ рд╡рд╛рд▓рд╛ AdWords API and Google Ads API Forum
Hi Luis,

it does not work.
What I mean was to stop receiving emails on MCC┬аExtending invitation events.

Thanks in advance,
zemen

Dannison Yao (AdWords API Team)

рдирд╣реАрдВ рдкрдврд╝реА рдЧрдИ,
21 рдордИ 2018, 3:52:50 am21/5/18
рдИрдореЗрд▓ рдкрд╛рдиреЗ рд╡рд╛рд▓рд╛ AdWords API and Google Ads API Forum
Hi Zemen,

Allow me to assist you on your concern as Luis is on OOO today. If you are looking for a way to stop the emails sent by AdWords when extending invitation, unfortunately, there is no way of doing this in AdWords API.

Regards,
Dannison
AdWords API Team
рд╕рднреА рдкреНрд░рд╖рдХреЛрдВ рдХреЛ рдЙрддреНрддрд░ рджреЗрдВ
рд▓реЗрдЦрдХ рдХреЛ рдЙрддреНрддрд░ рджреЗрдВ
рдЖрдЧреЗ рднреЗрдЬреЗрдВ
0 рдирдпрд╛ рдореИрд╕реЗрдЬ