I’m currently implementing the Google Ads API using Node.js. Everything works well in my local development environment, but the following issues occur after deploying to a live HTTPS server.
issue SummaryLocalhost: API requests work successfully
Production (HTTPS server):
API requests fail with error:
JavaScript console logs show:
Browser warning in developer tools:
What causes the Headers is not defined error when using fetch on the server side?
Are there specific CORS or request header configurations required for production use with Google Ads API?
Is there a best practice for securely using fetch or any recommended method to avoid these issues?
Please advise on how to resolve this. Let me know if you need a minimal code sample or more details.
Thank you!
If you haven't enabled logging yet, I would request that you enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby 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.
I hope this clarifies.
![]() |
Google Ads API Team |
[2025-07-04 10:59:29Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rhEQU:ref" (ADR-00317083)