Hello. I'm using AdWords API v201506 in .NET. I would like to send
invitation from ACCOUNT_MANAGER to ACCOUNT_CLIENT - I'm using belowe code
and it works:
AdWordsUser user = new AdWordsUser();
(user.Config as AdWordsAppConfig).ClientCustomerId = "ACCOUNT_MANAGER_ID";
ManagedCustomerService managedCustumer = (ManagedCustomerService)user.
GetService(AdWordsService.v201506.ManagedCustomerService);
LinkOperation linkOp = new LinkOperation();
ManagedCustomerLink link = new ManagedCustomerLink();
link.clientCustomerId = ACCOUNT_CLIENT_ID;
link.linkStatus = LinkStatus.PENDING;
link.managerCustomerId = ACCOUNT_MANAGER_ID;
linkOp.operand = link;
linkOp.@operator = Operator.ADD;
managedCustumer.mutateLink(new LinkOperation[] { linkOp });
I signin as ACCOUNT_CLIENT to adwords account by web browser and I find new
invitation - so it's working.
Next step is acceptation this invitation. So I', trying this:
AdWordsUser user = new AdWordsUser();
(user.Config as AdWordsAppConfig).ClientCustomerId = "ACCOUNT_CLIENT_ID";
ManagedCustomerService managedCustumer = (ManagedCustomerService)user.
GetService(AdWordsService.v201506.ManagedCustomerService);
LinkOperation linkOp = new LinkOperation();
ManagedCustomerLink link = new ManagedCustomerLink();
link.clientCustomerId = ACCOUNT_CLIENT_ID;
link.linkStatus = LinkStatus.ACTIVE;
link.managerCustomerId = ACCOUNT_MANAGER_ID;
linkOp.operand = link;
linkOp.@operator = Operator.SET;
managedCustumer.mutateLink(new LinkOperation[] { linkOp });
But it's not working - I still get exception:
[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'<null>'] for:
managedCustumer.mutateLink(new LinkOperation[] { linkOp });
According to documentation
<https://developers.google.com/adwords/api/docs/reference/v201506/ManagedCustomerService.AuthorizationError>
it's mean that "*User doesn't have permission to access customer*." Why I
can't get access? (In code: )I set CLIENT id for AdWords user, accept
invitation as CLIENT and point MANAGER as 'managerCustomer'.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/7d3a96c3-b0ca-4b64-80dd-96adb63d30ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.