Hi, In the step where you are trying to set the link to *ACTIVE*, are you using OAuth credentials for the AdWords account (ACCOUNT_CLIENT_ID)? That request will only work if the credentials are for a user who *already* has access to ACCOUNT_CLIENT_ID.
It sounds like you may be using the ACCOUNT_MANAGER_ID credentials for both calls, but that won't work at that point because users with access to the MCC won't yet have access to the client account. Cheers, Josh, AdWords API Team On Thursday, August 13, 2015 at 9:43:29 AM UTC-4, Adam Nowak wrote: > > 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. 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/b08d3f92-7884-4630-8a16-c286e6ce99da%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.