googleads / googleads-dotnet-lib

Google Ad Manager SOAP API .NET client library
Apache License 2.0
108 stars 199 forks source link

ManagedCustomerServiceError.UNKNOWN #228

Closed Swapygit closed 8 months ago

Swapygit commented 4 years ago

Hi Team,

We have a mobile app wherein customer registers and they can link their adwords account under our Mcc and they can view their performance data.

However, on Friday i.e 17th April 2020 we received ManagedCustomerServiceError.UNKNOWN error in our logs.

This customer tried the linking process twice. First time he got the ManagedCustomerServiceError.UNKNOWN. And the second time he was linked successfully under our mcc.

We checked the SOAP logs and "linkStatus" "INACTIVE" request was initiated but in our .NET Code we are initiating only two types of mutate link requests. One is we set the LinkStatus.PENDING and another is LinkStatus.ACTIVE;

Here is the .NET code sample.

1.) Link Status :- Pending Log(Convert.ToString(DateTime.Now + " mutatelinkpart one start")); ((AdWordsAppConfig)usermanager.Config).ClientCustomerId = "managermcc";// manager mcc id LinkOperation linkOp = new LinkOperation(); ManagedCustomerLink link = new ManagedCustomerLink(); link.clientCustomerId = cst[0].customerId; link.linkStatus = LinkStatus.PENDING; link.managerCustomerId = managermcc; linkOp.operand = link; linkOp.@operator = Operator.ADD; linkOp.operatorSpecified = true;

            ManagedCustomerService mcservice =
           (ManagedCustomerService)usermanager.GetService(AdWordsService.v201809.ManagedCustomerService);

mcservice.mutateLink(new LinkOperation[] { linkOp }); Log(Convert.ToString(DateTime.Now + " mutatelinkpart one End"));

2.) Link Status Active // Accepts the account link request on behalf of customer Log(Convert.ToString(DateTime.Now + " mutatelinkpart two start")); ((AdWordsAppConfig)user.Config).ClientCustomerId = client.customerId.ToString(); LinkOperation linkOp1 = new LinkOperation(); ManagedCustomerLink link1 = new ManagedCustomerLink(); link1.clientCustomerId = client .customerId; link1.linkStatus = LinkStatus.ACTIVE; link1.managerCustomerId = managermcc; linkOp1.operand = link1; linkOp1.@operator = Operator.SET;

            ManagedCustomerService mcservice1 =
           (ManagedCustomerService)user.GetService(AdWordsService.v201809.ManagedCustomerService);

            mcservice1.mutateLink(new LinkOperation[] { linkOp1 });
            Log(Convert.ToString(DateTime.Now + " mutatelinkpart two End"));

So what could be the reason for the LinkStatus INACTIVE request to be initiated in the SOAP logs.

christopherseeley commented 8 months ago

AdWords API has been turned down and replaced with the Google Ads API. Closing as stale.