API not returning 200 status with fieldMask but no data

64 views
Skip to first unread message

Rishabh Sharma

unread,
Jun 9, 2025, 4:25:57 AM6/9/25
to Google Ads API and AdWords API Forum
Hi there,
I am trying to fetch Google Ads campaign and Asset form realted data with API implementation, i am able to fetch customer ID info (Name, location etc) from the same API but when trying to fetch campaign and asset info with Queries (which i have tried a lot of different ones available on internet), I am just getting 200 status in response with field mask data but no information.

Context:
I am using a Manager account (Developer token which is in Test) and one test account on which i have made one campaign and listed one form asset with it.

Curl example:
curl --location 'https://googleads.googleapis.com/v20/customers/xxx/googleAds:search' \
--header 'Authorization: Bearer xxx' \
--header 'developer-token: xxx' \
--header 'Content-Type: application/json' \
--data '{
  "query": "SELECT asset.id, asset.name, asset.type, asset.lead_form_asset.call_to_action_type, asset.lead_form_asset.business_name, asset.lead_form_asset.headline, asset.lead_form_asset.description, asset.lead_form_asset.privacy_policy_url, asset.lead_form_asset.post_submit_headline, asset.lead_form_asset.post_submit_description FROM asset WHERE asset.resource_name = '\''customers/xxx/assets/xxx'\''"
}

or 
{
    "query": "SELECT campaign.id, campaign.name, campaign.status FROM campaign"
}

In response i am getting just getting the field mask with no data while its there on Google ads dashboard with campaign and form asset there.

Response:
{
    "fieldMask": "asset.id,asset.name,asset.type,asset.leadFormAsset.callToActionType,asset.leadFormAsset.businessName,asset.leadFormAsset.headline,asset.leadFormAsset.description,asset.leadFormAsset.privacyPolicyUrl,asset.leadFormAsset.postSubmitHeadline,asset.leadFormAsset.postSubmitDescription"
}

Can anyone help me here?

Thanks
Rishabh
'

Google Ads API Forum Advisor

unread,
Jun 9, 2025, 6:48:43 AM6/9/25
to ris...@zilter.io, adwor...@googlegroups.com
Hi Rishabh,

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

I understand that you are getting an empty response when trying to fetch the campaign and asset information via the Google Ads API.

To investigate the issue further, we need the complete API logs. Could you provide us with the "complete API logs" (request and response with request-id and request header) generated on your end without redacting any information? 

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.NetPHP, PythonRuby 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.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-09 10:47:24Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01reeCK:ref" (ADR-00312547)



Google Ads API Forum Advisor

unread,
Jun 9, 2025, 1:21:37 PM6/9/25
to ris...@zilter.io, adwor...@googlegroups.com
Hi,

Please be informed that the reason why you are unable to retrieve the campaign data from the account ID '3158293439' is because the account ID is an MCC account ID, not the client account ID. I would like to inform you that you cannot directly request metrics or reports at the MCC level; instead, you can retrieve aggregated data by making API requests to each client account under the MCC via the Google Ads API. 

Also, I could see that you are still using the 'v13' of the Google Ads API which is already deprecated. I would recommend migrating to the latest version v20, please follow this guide to upgrade to the latest version. Please note that we are unable to reproduce any response with the request that you have provided.

I hope this helps! Feel free to get back to us in case of any further queries.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-09 17:20:49Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01reeCK:ref" (ADR-00312547)



Reply all
Reply to author
Forward
0 new messages