Hi, 

we need some help at Google Ads API configuration, we developed an 
integration using Google AdWords that will auto create Google Ads customers 
and we are migrating to Google Ads API v8 recently. After the change, the 
request to get a customer ID failed with below error message:

{
  "StatusCode": 3,
  "Details": "Request contains an invalid argument.",
  "RequestId": "_GphQ-gsNj0jQGn1ldN_Yg",
  "Failure": {
    "errors": [
      {
        "errorCode": {
          "requestError": "INVALID_CUSTOMER_ID"
        },
        "message": "Invalid customer ID '472-xxx-xxxx'."
      }
    ],
    "requestId": "_GphQ-gsNj0jQGn1ldN_Yg"
  }
}

that customer ID is a Test Manager Account that we used before during the 
development, now it has a strange status as shown in the below screenshot, 
could that be the reason that it is showing this error? If yes, how can we 
solve this situation?

[image: Screenshot 2021-10-13 220347.png]

This is our implementation that is throwing this error:

public Result<string> GetSubAccountId(PdCompany company, PdDeal deal)
 {
            var result = Result<string>.Ok();
            var config = new GoogleAdsConfig
            {
                DeveloperToken = Config.GoogleAdsDeveloperToken,
                OAuth2Scope = "https://www.googleapis.com/auth/adwords";,
                OAuth2ClientId = Config.GoogleOAuth2ClientId,
                OAuth2ClientSecret = Config.GoogleOAuth2ClientSecret,
                OAuth2RefreshToken = Config.GoogleOAuth2RefreshToken
            };
            var adsClient = new GoogleAdsClient(config);
            var svc = adsClient.GetService(Services.V8.GoogleAdsService);

            var response = svc.Search(Config.GoogleAdsClientCustomerId, $@"
                SELECT  customer.id 
                FROM     customer 
                WHERE   customer.descriptive_name = 
'{GetSubAccountName(company, deal)}'");

            result.Success = response.Any();
            if (result.Success)
            {
                result.Data = response.First().Customer.Id.ToString();
            }
            return result;
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d84453ae-1676-463b-95bb-53d1cb0f104dn%40googlegroups.com.
  • In... Roy Yin
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to