HTTP/1.1 400 Bad Request
Content-length: 1059
X-xss-protection: 0
X-content-type-options: nosniff
Transfer-encoding: chunked
Request-id: yzVB1VW3hFtrOsymauYSMA
Vary: Origin, X-Origin, Referer
Server: ESF
-content-encoding: gzip
Cache-control: private
Date: Mon, 01 Jul 2019 07:43:27 GMT
X-frame-options: SAMEORIGIN
Alt-svc: quic=":443"; ma=2592000; v="46,44,43,39"
Content-type: application/json; charset=UTF-8
{
"error": {
"status": "INVALID_ARGUMENT",
"message": "Request contains an invalid argument.",
"code": 400,
"details": [
{
"errors": [
{
"errorCode": {
"operationAccessDeniedError": "OPERATION_NOT_PERMITTED_FOR_AD_GROUP_TYPE"
},
"message": "This operation is not permitted on this ad group type.",
"trigger": {
"stringValue": "SEARCH_STANDARD"
},
"location": {
"fieldPathElements": [
{
"index": "0",
"fieldName": "operations"
},
{
"fieldName": "create"
},
{
"fieldName": "ad"
},
{
"fieldName": "expanded_dynamic_search_ad"
}
]
}
}
],
"@type": "type.googleapis.com/google.ads.googleads.v1.errors.GoogleAdsFailure"
}
]
}
}
{
'operations': {
'create': {
'name': 'EXPANDED DYNAMIC SEARCH AD TEST',
'status': 'ENABLED',
'type': 'UNSPECIFIED',
'campaign': 'customers/5838476497/campaigns/2049402155',
'cpc_bid_micros': 100000000
}
}
}
POST /v1/customers/5838476497/adGroupAds:mutate HTTP/1.1
Host: googleads.googleapis.com
Developer-token: REDACTED
Content-length: 508
Content-type: application/json
Authorization: Bearer ya29.Gl04B0kA4DF5KPvTXDq1KQtDhCM19v3jqgJ_PXKnjU3GouIfiFeXAxroPqQG0jthdycD93pfKDnf2Ja_-gqIe4M9pgf8zTMo7UqL9FvhCmDFm9zjnTuCe7Ax1ONyR6E
Login-customer-id: 9311321390
{
'operations': {
'create': {
'status': 'ENABLED',
'ad_group': 'customers/5838476497/adGroups/69319334301',
'ad': {
'final_urls': ['https://www.foo.jp'],
'type': 'EXPANDED_DYNAMIC_SEARCH_AD',
'added_by_google_ads': true,
'name': 'EXPANDED DYNAMIC SEARCH AD TEST',
'expanded_dynamic_search_ad': {
'description': 'Buy your favorite!'
}
}
}
}
}
Hi,
Thank you contacting support. I tried creating a new ad using code sample from Java Client libraries to create Expanded Dynamic Search Ads and have attached the logs. The AdGroupType enum value should be set to SEARCH_DYNAMIC_ADS for creating the expanded dynamic Search Ads instead of SEARCH_STANDARD or UNSPECIFIED. You could refer to AdGroupType for the types of Ad groups specific to a particular campaign channel type. Let us know if this helps.
Regards,
Nikisha Patel, Google Ads API Team