Google Ads api - error: Invalid customer ID 'undefined'

80 views
Skip to first unread message

dw yang

unread,
Jun 17, 2024, 7:49:46 AM6/17/24
to Google Ads API and AdWords API Forum
Hello,
I am trying to retrieve data from Google ads by linking them to the service I am developing using node.js and react. 
I have a question because an error occurred during development. 

[summary]
- Remove the '-' from the Google ads account ID and enter only numbers like "xxxxxxxxxx". 
- There is an mcc account in the environment variables. 
- When I checked with the console, the customer ID appeared. 
- After successful Google oauth2 authentication, entering the Google ads account ID and clicking the data import button, the error below occurs. 

01) 
[ { error_code: [Object], message: "Invalid customer ID 'undefined'." } ], 

02) 
AxiosError {message: 'Request failed with status code 500', name: 'AxiosError', code: 'ERR_BAD_RESPONSE', config: {… }, request: XMLHttpRequest, … } code : "ERR_BAD_RESPONSE" config : {transitional: {… }, adapter: Array(3), transformRequest: Array(1), transformResponse: Array(1), timeout: 0, … } message : "Request failed with status code 500" name : "AxiosError"


Screenshot 2024-06-17 at 6.24.09 PM.png

Screenshot 2024-06-17 at 6.25.33 PM.png

Screenshot 2024-06-17 at 6.42.03 PM.png

I don't know why.
Please let me know the problem and solution.

Thank you in advance.




Google Ads API Forum Advisor

unread,
Jun 17, 2024, 11:46:45 AM6/17/24
to daewo...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After checking the information provided, I understand that you are facing issues while retrieving data using Google Ads API. In order to assist you further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end without redacting the customer-id and login-customer-id.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJMBh:ref" (ADR-00241761)

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!


Message has been deleted

Google Ads API Forum Advisor

unread,
Jun 17, 2024, 3:27:54 PM6/17/24
to daewo...@gmail.com, adwor...@googlegroups.com
Hi,

I have tried the same query from my end and I did not get any error. I would recommend that you execute the same query with this REST API Interface. If the error still persists, kindly provide us with the logs that you are getting with the REST API Interface. 
Reply all
Reply to author
Forward
0 new messages