Asset (headline) issue while creating add (400: invalid argument)

37 views
Skip to first unread message

PatrykO

unread,
Sep 4, 2022, 5:12:15 PM9/4/22
to Google Ads API and AdWords API Forum
Hi there,
I'm trying to create new ad on low-code tools (zapier, make). 

While creating AdGroup Ad there is an issue with 'headlines' field:

INVALID_ARGUMENT (400)
Invalid value at 'operations[0].create.ad.responsive_search_ad.headlines' (type.googleapis.com/google.ads.googleads.v11.common.AdTextAsset), "test1"

In official api, I've noticed there's a code:
'headlines' => [
new AdTextAsset(['text' => 'Cruise to Mars']),
new AdTextAsset(['text' => 'Best Space Cruise Line']),
new AdTextAsset(['text' => 'Experience the Stars'])
],

Since I'm creating an asset in the previous step, I need to put certain value in this (create ad) step.

What is the correct format of "new AdTextAsset(['text' => 'Cruise to Mars']),"

I was trying the text value, an array (of texts) and a resourcename - nothing works.

Thanks in advance!



PatrykO

unread,
Sep 4, 2022, 5:21:55 PM9/4/22
to Google Ads API and AdWords API Forum
In other words - what is the correct format for REST API request?

Google Ads API Forum Advisor

unread,
Sep 5, 2022, 1:38:53 AM9/5/22
to patryk...@aurero.com, adwor...@googlegroups.com
Hi,

Thank you for reaching us out. I am Sherwin from Google Ads API support team. I hope that you are doing well today.

Since your main concern is the correct format for REST API request, you may check this documentation for AdTextAsset. You may also check these sample codes for creating Responsive Search ads.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2dvLAW:ref
Reply all
Reply to author
Forward
0 new messages