Error when using searchStream Customer ID is not valid

19 views
Skip to first unread message

Alejandro Bar Acedo

unread,
Feb 2, 2023, 7:39:51 AM2/2/23
to Google Ads API and AdWords API Forum
Hi, there.

After a few days reading the docs I've been able to config a project to consume the Google Ads API but I don't know why I get an error saying that the Customer ID is not correct.

I don't know what to do as I followed all the steps from the docs: https://developers.google.com/google-ads/api/docs/client-libs/php/oauth-web

I cloned the PHP sample project to generate de refresh_token (it worked) and I tried the Get Campaigns example (https://developers.google.com/google-ads/api/samples/get-campaigns) to check if it works.

I get the Customer ID following your docs: https://support.google.com/google-ads/answer/1704344?hl=en

What went wrong if I followed all the steps and I have the client_id, secret_id, refresh_token and the customer_id?

Google Ads API Forum Advisor

unread,
Feb 2, 2023, 11:29:17 AM2/2/23
to ab...@habitissimo.com, adwor...@googlegroups.com

Hi Alejandro,

Thank you for reaching out to Google Ads API Forum.

Kindly note that when supplying the customer Id in your request, the hyphen (-) should be excluded. For example if your customer Id shown in Google Ads UI is 123-456-7890 the value to be set should be 1234567890 in your request. Also note that you must use a client account ID as the customer Id in your request, while your login-customer-id is your manager account.

Let me know how it goes on your end if this resolves your issue. In the event that the error persists after trying the suggested solution, then you may provide to us the complete request and response logs with the request-id generated from your end so we can investigate further. You can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

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

Regards,

Google Logo
Abigail
Google Ads API Team
 


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