I am able to create DEMAND_GEN type campaigns with the same request but not 
this one.

Here is the curl of the request I am trying to run, followed by the api 
response - 
curl --location 
'https://googleads.googleapis.com/v17/customers/{{CUSTOMER_ID}}/campaigns:mutate'
 
\
--header 'developer-token: {{DEVELOPER_TOKEN}}' \
--header 'login-customer-id: {{LOGIN_CUSTOMER_ID}} \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{TOKEN}}' \
--data '{
    "operations": [
        {
            "create": {
                "name": "A smart campaign",
                "status": "PAUSED",
                "campaignBudget": 
"customers/{{CUSTOMER_ID}}/campaignBudgets/{{BUDGET_ID}}",
                "advertisingChannelType": "SMART",
                "advertisingChannelSubType": "SMART_CAMPAIGN",
                "targetCpa": {
                    "targetCpaMicros": 5000000
                }
            }
        }
    ]
}
'

Here is the response from the api -
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": 
"type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "contextError": 
"OPERATION_NOT_PERMITTED_FOR_CONTEXT"
                        },
                        "message": "The operation is not allowed for the 
given context.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "target_cpa"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "mutateError": "RESOURCE_NOT_IN_GOOGLE_ADS"
                        },
                        "message": "The resource isn't in Google Ads. It 
belongs to another ads system.",
                        "trigger": {
                            "int64Value": "13772297422"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "campaign_budget"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "MlaH1pp2485Ww4E768Do0g"
            }
        ]
    }
}

Thanks for your help 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a72b5407-aac5-4eb3-8378-93260114bd59n%40googlegroups.com.
  • Cr... Darshan Dhabale
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Darshan Dhabale
        • ... Darshan Dhabale

Reply via email to