How to make Dynamic Search Ads via curl request

46 views
Skip to first unread message

f s

unread,
Jun 28, 2019, 5:45:26 AM6/28/19
to AdWords API and Google Ads API Forum
Hello, Google Ads API Team.

I'd like to create the Dynamic Search Ads via curl, so I post the following JSON to: https://googleads.googleapis.com/v1/customers/5838476xxx/campaigns:mutate

{
     
'operations': {
       
'create': {
         
'name': 'New campaign',
         
'advertising_channel_type': 'SEARCH',
         
'status': 'PAUSED',
         
'dynamic_search_ads_setting': {
           
'domain_name': 'www.foo.com',
           
'language_code': 'ja',
           
'use_supplied_urls_only': true
         
},
         
'campaign_budget': 'customers/5838476xxx/campaignBudgets/2113622xxx',
         
'start_date': '20190701',
         
'end_date': '20190801',
         
'manual_cpc': {
           
'enhanced_cpc_enabled': false
         
}
       
}
     
}
   
}

But, I receive the following response:

{
 
"error": {
   
"status": "INVALID_ARGUMENT",
   
"message": "Request contains an invalid argument.",
   
"code": 400,
   
"details": [
     
{
       
"errors": [
         
{
           
"errorCode": {
             
"settingError": "DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT"
           
},
           
"message": "At least one feed id should be present.",
           
"trigger": {
             
"stringValue": ""
           
},
           
"location": {
             
"fieldPathElements": [
               
{
                 
"index": "0",
                 
"fieldName": "operations"
               
},
               
{
                 
"fieldName": "create"
               
},
               
{
                 
"fieldName": "dynamic_search_ads_setting"
               
}
             
]
           
}
         
}
       
],
       
"@type": "type.googleapis.com/google.ads.googleads.v1.errors.GoogleAdsFailure"
     
}
   
]
 
}
}

What is feed id? How should I make it? Is that another request? Then, How should I do after creating a campaign?
Could you give me some hints?

Thanks.

Google Ads API Forum Advisor Prod

unread,
Jun 28, 2019, 11:45:51 AM6/28/19
to symb...@gmail.com, adwor...@googlegroups.com
Hello, 

Happy to assist you with this concern. I am not able to replicate the issue with the similar request. Please find the attached logs from my testing. Could you provide us with the request and response logs without redacting, which includes the request Id to check this further? You can share the details privately via Reply privately to author option. 

Regards,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UCZyjK:ref
Sample_logs.rtf

f s

unread,
Jun 30, 2019, 10:07:09 PM6/30/19
to AdWords API and Google Ads API Forum
Thank you, Bharani

I found the mistakes and succeeded, but I'm concerned. Just in case, I'll attach a successful pattern and a failed pattern via Node.js.
In a campaign request, if I put
  
'use_supplied_urls_only': true

I get an error, otherwise I will succeed.

Thank you for your help.
log.txt
Reply all
Reply to author
Forward
0 new messages