INVALID_CUSTOMER_ID Error for Google ads api

4,474 views
Skip to first unread message

Subhranshu Mohanty

unread,
Feb 14, 2022, 1:41:05 PM2/14/22
to Google Ads API and AdWords API Forum
Hi, Even after passing the correct customer ID, I am still getting an Invalid customer ID. I am passing the 10 digits customer id without the hyphen. Lemme know what's the issue. Thanks. {
"_error": {
"description": "(<_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.INVALID_ARGUMENT\n\tdetails = \"Request contains an invalid argument.\"\n\tdebug_error_string = \"{\"created\":\"@1644851339.182074700\",\"description\":\"Error received from peer ipv4:74.125.24.95:443\",
\"file\":\"src/core/lib/surface/call.cc\",\"file_line\":1074,\"grpc_message\":\"Request contains an invalid argument.\",\"grpc_status\":3}\"\n>,
<_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.INVALID_ARGUMENT\n\tdetails = \"Request contains an invalid argument.\"\n\tdebug_error_string = \"{\"created\":\"@1644851339.182074700\",
\"description\":\"Error received from peer ipv4:74.125.24.95:443\",\"file\":\"src/core/lib/surface/call.cc\",\"file_line\":1074,\"grpc_message\":
\"Request contains an invalid argument.\",\"grpc_status\":3}\"\n>, errors {\n error_code {\n request_error: INVALID_CUSTOMER_ID\n }\n
message: \"Invalid customer ID \\'`********`\\'.\"\n}\nrequest_id: \"PnwmSKJZKnjJx1xL6m5tVw\"\n, 'PnwmSKJZKnjJx1xL6m5tVw')",
"exception": "GoogleAdsException",
"traceback": "Traceback (most recent call last):\n File \"/src/lib/delivery/delivery.py\", line 75, in run_delivery_manager\n
custom_exit_sql=body.get(\"custom_exit_sql\"))\n File \"/src/lib/delivery/manager.py\", line 229, in deliver\n
raise ex\n File \"/src/lib/delivery/manager.py\", line 174, in deliver\n trace_id=message[\"trace_id\"])\n
File \"/src/lib/delivery/manager.py\", line 323, in _route_to_google_ads\n audience_id=destination_audience_id)\n
File \"/src/lib/delivery/channel/google.py\", line 40, in __init__\n self.audience_id = self.get_audience()\n File \"/src/lib/delivery/channel/google.py\",
line 78, in get_audience\n result = self._find_audience_by_id(self.audience_id)\n File \"/src/lib/delivery/channel/google.py\", line 103, in _find_audience_by_id\n
result = self.google_user_list_service_client.get_user_list(resource_name=resource_name)\n File \"/.ve/lib/python3.7/site-packages/google/ads/googleads/v9/services/services/user_list_service/client.py\",
line 446, in get_user_list\n request, retry=retry, timeout=timeout, metadata=metadata,\n File \"/.ve/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py\",
line 154, in __call__\n return wrapped_func(*args, **kwargs)\n File \"/.ve/lib/python3.7/site-packages/google/api_core/grpc_helpers.py\", line 66, in error_remapped_callable\n
return callable_(*args, **kwargs)\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 221, in __call__\n compression=compression)\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 257, in _with_call\n
return call.result(), call\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 126, in result\n raise self._exception\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 247, in continuation\n
compression=new_compression)\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 271, in with_call\n compression=compression)\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 257, in _with_call\n
return call.result(), call\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 126, in result\n raise self._exception\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 247, in continuation\n compression=new_compression)\n
File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 271, in with_call\n compression=compression)\n File \"/.ve/lib/python3.7/site-packages/grpc/_interceptor.py\", line 256, in _with_call\n request)\n
File \"/.ve/lib/python3.7/site-packages/google/ads/googleads/interceptors/exception_interceptor.py\", line 99, in intercept_unary_unary\n self._handle_grpc_failure(response)\n File \"/.ve/lib/python3.7/site-packages/google/ads/googleads/interceptors/exception_interceptor.py\",
line 71, in _handle_grpc_failure\n raise self._get_error_from_response(response)\ngoogle.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.INVALID_ARGUMENT\n\tdetails = \"Request contains an invalid argument.\"\n\tdebug_error_string = \"{\"created\":\"@1644851339.182074700\",
\"description\":\"Error received from peer ipv4:74.125.24.95:443\",\"file\":\"src/core/lib/surface/call.cc\",\"file_line\":1074,\"grpc_message\":\"Request contains an invalid argument.\",\"grpc_status\":3}\"\n>, <_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.INVALID_ARGUMENT\n\tdetails = \"Request contains an invalid argument.\"\n\tdebug_error_string =
\"{\"created\":\"@1644851339.182074700\",\"description\":\"Error received from peer ipv4:74.125.24.95:443\",\"file\":\"src/core/lib/surface/call.cc\",\"file_line\":1074,\"grpc_message\":\"Request contains an invalid argument.\",\"grpc_status\":3}\"\n>, errors {\n error_code {\n request_error: INVALID_CUSTOMER_ID\n }\n
message: \"Invalid customer ID \\'`******`\\'.\"\n}\nrequest_id:
\"PnwmSKJZKnjJx1xL6m5tVw\"\n, 'PnwmSKJZKnjJx1xL6m5tVw')\n"
}
}

Bryce Barbara

unread,
Feb 14, 2022, 1:46:12 PM2/14/22
to Google Ads API and AdWords API Forum
What's the actual API endpoint you're trying to call? Have you tried passing in the value as a resource name in the format of 'customers/{customerId}'? There isn't a lot of consistency between the various methods in the SDKs.

Google Ads API Forum Advisor

unread,
Feb 14, 2022, 5:38:23 PM2/14/22
to smoh...@atlassian.com, adwor...@googlegroups.com

Hello Subhranshu,

Thanks for reaching out to the Google Ads API support. The error INVALID_CUSTOMER_ID occurs if customer ID is invalid. When making an API call, you must use a client account ID as the customer Id in your request, while your login-customer-id is your manager account, if you're authenticating as a user that has access to our manager account. This error is also encountered if the API request sends to pause Ads from one account that belonged to a different account.

If the issue still persists, we request that you provide us with the complete request and response logs with  request-id and request header via the Reply privately to author option or directly to our googleadsa...@google.com alias, in order for us to investigate further.
For the client library, logging can be enabled by navigating to the Client libraries > Your client library (ex. Python) > Logging documentation, which you can access from this link.

Hope this helps. Let us know if you have any further questions.

Best regards,

Google Logo
Jakeia Sabrina
Google Ads API Team
 
 

ref:_00D1U1174p._5004Q2WvZZh:ref

Subhranshu Mohanty

unread,
Feb 15, 2022, 12:57:41 AM2/15/22
to Google Ads API and AdWords API Forum
Thanks, It got resloved.
Message has been deleted
Message has been deleted

Google Ads API Forum Advisor

unread,
Apr 19, 2022, 10:07:42 AM4/19/22
to ha...@theblueagency.nl, adwor...@googlegroups.com

Hello there,

Thanks for reaching out. Please follow this below guideline to resolve the issue regarding this error.
The error INVALID_CUSTOMER_ID occurs if the customer ID is invalid. When making an API call, you must use a client account ID as the customer Id in your request, while your login-customer-id is your manager account, if you're authenticating as a user that has access to our manager account. This error is also encountered if the API request sends to pause Ads from one account that belonged to a different account.



If the issue still persists, we request that you provide us with the complete request and response logs with  request-id and request header via the Reply privately to author option or directly to our googleadsa...@google.com alias, in order for us to investigate further.

For the client library, logging can be enabled by navigating to the Client libraries > Your client library (ex. Python) > Logging documentation, which you can access from this link.

Hope this helps. Let us know if you have any further questions.

Best regards,

Reply all
Reply to author
Forward
0 new messages