Hello,

As you can see from the above post I'm using the CustomerMCC for 
Client.config.loginCustomerId and am getting the "USER_PERMISSION_DENIED 
error.  Pasted below for easy reference.

Headers: {
  "x-goog-api-client": "gl-dotnet/4.0.30319 gapic/5.0.0 
gax/3.1.0+acac8dfe75024cb815497966fe13fc6cb1a1b0ed grpc/2.32.0",
  "developer-token": "REDACTED",
  "login-customer-id": "<CustomerMCC>", <--the account that needs to accept 
the invitation
  "x-goog-request-params": "customer_id= <CustomerMCC>  "
}

Below is the customerManagerLinkOperation
[ { "update": { "resourceName": 
"customers/<CustomerMCC>/customerManagerLinks/MasterMCC~ManagerLinkId", 
"status": "ACTIVE" }, "updateMask": "resourceName,status" } ]

Below is my AcceptInvitation code...

        private string AcceptInvitation(Int64 CompanyMCC, string 
managerLinkResourceName)
        {
            if (managerLinkResourceName.Length > 0)
            {
                Int64 MasterMCC = 
Convert.ToInt64(Client.Config.LoginCustomerId);
                Client.Config.LoginCustomerId = CompanyMCC.ToString();

                CustomerManagerLinkServiceClient customerManagerLinkService 
= Client.GetService(Services.V5.CustomerManagerLinkService);

                CustomerManagerLink customerManagerLink = new 
CustomerManagerLink()
                {
                    ResourceName = managerLinkResourceName,
                    Status = 
Google.Ads.GoogleAds.V5.Enums.ManagerLinkStatusEnum.Types.ManagerLinkStatus.Active
                };

                CustomerManagerLinkOperation customerManagerLinkOperation = 
new CustomerManagerLinkOperation
                {
                    Update = customerManagerLink,
                    UpdateMask = 
FieldMasks.AllSetFieldsOf(customerManagerLink)
                };

                MutateCustomerManagerLinkResponse response = 
customerManagerLinkService.MutateCustomerManagerLink(CompanyMCC.ToString(), 
new[] { customerManagerLinkOperation });
            }

            return "success";
        }

Not sure what I'm missing.

KDJ
On Thursday, March 4, 2021 at 11:22:37 AM UTC-8 adsapiforumadvisor wrote:

> Hi,
>
> Thank you for reaching out. The customerId used for 
> Client.config.loginCustomerId should be the CustomerMCC account id. It is 
> the account that you would like to accept the invitation to link to your 
> MasterMCC.
>
> Thanks and regards,
> Xiaoming, Google Ads API Team
>  
>
> [image: Google Logo] 
> Xiaoming 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2DKyVu:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/aa47e82e-1fae-421c-bf29-4fbccebd7b99n%40googlegroups.com.

Reply via email to