Campaigns Not Returned for Client Accounts via Google Ads API v20 (Node.js)

28 views
Skip to first unread message

Mark Ignacio

unread,
Jun 30, 2025, 3:44:24 AMJun 30
to Google Ads API and AdWords API Forum
Hi Google Ads API Support,
I am following up on my previous ticket(This message is in relation to case "ref:!00D1U01174p.!500Ht01rgV1N:ref" (ADR-00315985)( regarding the inability to fetch campaigns for real client accounts using the Google Ads API v20 (Node.js client library).
I apologize if I created another post instead of Replying privately, I'm having an error when doing so.
Summary of the Issue:
  • I am able to fetch campaigns for a test account, but for all real client accounts, the API returns an empty array.
  • The OAuth user is directly added to the client accounts with active status.
  • The accounts have active campaigns visible in the Google Ads UI.
API Call Details:
  • I am using the Node.js client library for v20.
  • For each request:
customer_id is set to the client account ID (not an MCC).
login_customer_id is set to the top-level MCC ID (from listAccessibleCustomers).
  • The query used is:   SELECT campaign.id, campaign.name, campaign.advertising_channel_type, campaign.status FROM campaign
  • The refresh token is valid and works for the test account.
Console Log Output:
[DEBUG] Target client account ID (customer_id): [redacted]
[DEBUG] Executing query on customer instance...
[DEBUG] Successfully received API response: []
--- [SUCCESS] CAMPAIGN FETCH for clientId: [redacted] ---
(node:XXXXX) MetadataLookupWarning: received unexpected error = All promises were rejected code = UNKNOWN
(Use `node --trace-warnings ...` to show where the warning was created)

What I’ve Tried:
  • Verified the OAuth user is directly added to each client account (not just inherited via MCC).
  • Confirmed the accounts have active campaigns.
  • Used the recommended query and parameters per your previous advice.
  • The same code works for the test account, but not for real accounts.
Request:
  • Can you help investigate why the API returns empty results for real client accounts, despite the correct setup and active campaigns?
  • Is there anything else I should check regarding permissions, account status, or API usage for v20?
Thank you for your assistance!

Google Ads API Forum Advisor

unread,
Jun 30, 2025, 6:09:05 AMJun 30
to mark.i...@gokopa.com, adwor...@googlegroups.com
Hi,

It looks like you missed our previous response. Please refer to the below response from our team:
  • "Based on the information provided, I understand that you are getting an empty result while fetching the campaign data using the Google Ads API. Please note that the details you provided do not include the client account ID from which you are attempting to fetch campaign-level data using the Google Ads API. However, I understand that you are passing the login-customer-id field with the top-level MCC account ID (6019969454). As previously mentioned, we attempted to retrieve data from the client account (3660249037) and were able to do so successfully without any issues. For our request, we specified the customer_id as the client account ID (3660249037) and the login-customer-id as the MCC account ID (6019969454). For your reference, I am attaching a text file containing the sample request and response logs.
In order to further investigate, I would request you to provide the client account ID from which you are trying to pull the campaign level data using the Google Ads API. Additionally, provide us with the complete API logs (without redacting) (request and response with request-id and request header) generated at your end for further investigation.​"

Yes, your response created another post instead of a private reply. 
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-30 10:08:04Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rgV1N:ref" (ADR-00315985)



Campaign_logs.txt
Reply all
Reply to author
Forward
0 new messages