Get ListAccessibleCustomers error "Request contains an invalid argument"

168 views
Skip to first unread message

Khải Nguyễn Danh

unread,
Apr 10, 2023, 7:02:52 AM4/10/23
to Google Ads API and AdWords API Forum
Hi i have granted this webapp permission to access my ad account but when i try to get client data getting the error "", _developerToken, _clientId, _clientSecret are what i use to get the account .RefestToken, but when I reuse it here it gives an error, here is my code:

 GoogleAdsConfig config = new GoogleAdsConfig()
                {
                    DeveloperToken = _developerToken,
                    OAuth2Mode = Google.Ads.Gax.Config.OAuth2Flow.APPLICATION,
                    OAuth2ClientId = _clientId,
                    OAuth2ClientSecret = _clientSecret,
                    OAuth2RefreshToken = account.RefestToken,
                };

                GoogleAdsClient googleAdsClient = new GoogleAdsClient(config);
CustomerServiceClient customerServiceClient =
                    googleAdsClient.GetService(Google.Ads.GoogleAds.Services.V11.CustomerService);

Google.Ads.GoogleAds.V11.Errors.GoogleAdsException: 'Status(StatusCode="InvalidArgument", Detail="Request contains an invalid argument.", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1681123473.142000000","description":"Error received from peer ipv4:142.251.130.10:443","file":"..\..\..\src\core\lib\surface\call.cc","file_line":1070,"grpc_message":"Request contains an invalid argument.","grpc_status":3}")'

Google Ads API Forum Advisor

unread,
Apr 11, 2023, 4:34:37 AM4/11/23
to khai.nguy...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for raising this concern in the Google Ads API Forum.

It appears that you are using V11, which is already deprecated. That said, we highly recommend that you use the newest version to avoid any errors. You may check out our documentation for deprecation and sunset schedule (https://developers.google.com/google-ads/api/docs/sunset-dates) and this blog post (https://ads-developers.googleblog.com/2023/02/google-ads-api-v11-sunset-reminder.html) for more information.

If the error still persists, can you please provide the complete logs within the format provided below that were generated on your end:

request: https://developers.google.com/google-ads/api/docs/concepts/field-service#request
response: https://developers.google.com/google-ads/api/docs/concepts/field-service#response
request ID: https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id
request header: https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers

We asked this so our team could better investigate and provide guidance accordingly. Note that these logs can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. You may check the logging guide (https://developers.google.com/google-ads/api/docs/best-practices/logging#client_library_logging) and click your client library for the specific guideline to enable it.

You may then send the requested logs via the Reply privately to the author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2kTeNO:ref
Reply all
Reply to author
Forward
0 new messages