I understand I need a feed to create these types of campaigns and ads, so I created one and added items to it and passed it in the feeds array, but it throws RESOURCE_NOT_FOUND for the feed. I am using REST because I have a go application. Thanks for your help.
Here is the curl-
curl --location '
https://googleads.googleapis.com/v16/customers/4926841893/campaigns:mutate' \
--header 'developer-token: hN6dsqjNmj3tWdITcPd_Qg' \
--header 'login-customer-id:
3263459376' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ya29.a0AXooCgtwzrs81z1hxZc4bTEspQklcPN392Fv9As7TuVOJLxMtQsJ08lo6jFhIbMR79DE4oc9x-OAtN0Vkgj9Q-BU0m2Eh12Dt-Kjb5Df_XQCvww3UtI2cl-zDqvSaO_pPgPUndc4hYlV_3af32_HaIuqvvEi-AIaP7QfaCgYKAcMSARMSFQHGX2MiTLc7Bd3tJdvYE32ExmM-ew0171' \
--data '{
"operations": [
{
"create": {
"name": "Dynamic search campaign",
"status": "PAUSED",
"campaignBudget": "customers/4926841893/campaignBudgets/13757766883",
"advertisingChannelType": "SEARCH",
"networkSettings": {
"targetGoogleSearch": true,
"targetSearchNetwork": true,
"targetContentNetwork": true,
"targetPartnerSearchNetwork": false
},
"target_spend": {},
"dynamicSearchAdsSetting": {
"domainName": "
example.com",
"languageCode": "en",
"feeds": [
"customers/4926841893/feeds/443568318"
],
"useSuppliedUrlsOnly": true
}
}
}
]
}'
here is the response
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "
type.googleapis.com/google.ads.googleads.v16.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"mutateError": "RESOURCE_NOT_FOUND"
},
"message": "Resource was not found.",
"trigger": {
"int64Value": "443568318"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "dynamic_search_ads_setting"
},
{
"fieldName": "feeds"
}
]
}
}
],
"requestId": "q_CzJvkVU-ON-3f8MVJ-Ng"
}
]
}
}