Creating App Campaign - errors = OPERATION_NOT_PERMITTED_FOR_CONTEXT and INCOMPATIBLE_BIDDING_STRATEGY_AND_BIDDING_STRATEGY_GOAL_TYPE

83 views
Skip to first unread message

Darshan Dhabale

unread,
Jul 29, 2024, 5:17:29 AM7/29/24
to Google Ads API and AdWords API Forum
I am using the REST interface
Here is my request curl and response
Thanks for your help

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.a0AXooCgtcFCq88QpzE-082AKQng5h1oXpJ-WvI-qLlkdzQNLN9AgNUUCwzU4wn_cUjWLEa3wGHFGFeDU40BPD_p2wqGSXBCD6Mi1E9Ew82IxMot3Z1ct-IGrEOlupFLOFPA2njdXgU4x2cmoDo8X1KtDm1ofv1Hg6wBZVaCgYKAR0SARMSFQHGX2MiSoHhPa5pxiQPHwZsgOUylw0171' \
--data '{
    "operations": [
        {
            "create": {
                "name": "An app campaign",
                "status": "PAUSED",
                "campaignBudget": "customers/4926841893/campaignBudgets/13774063170",
                "advertisingChannelType": "MULTI_CHANNEL",
                "advertisingChannelSubType": "APP_CAMPAIGN",
                "networkSettings": {
                    "targetGoogleSearch": true,
                    "targetSearchNetwork": true,
                    "targetContentNetwork": true,
                    "targetPartnerSearchNetwork": false
                },
                "biddingStrategyType": "TARGET_CPA",
                "appCampaignSetting": {
                    "biddingStrategyGoalType": "OPTIMIZE_INSTALLS_WITHOUT_TARGET_INSTALL_COST",
                    "appStore": "GOOGLE_APP_STORE",
                    "appId": "com.nintendo.zaka"
                },
                "biddingStrategy": "customers/4926841893/biddingStrategies/11157096856"
            }
        }
    ]
}'

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": {
                            "contextError": "OPERATION_NOT_PERMITTED_FOR_CONTEXT"
                        },
                        "message": "The operation is not allowed for the given context.",
                        "trigger": {
                            "int64Value": "11157096856"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "bidding_strategy"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "biddingStrategyError": "INCOMPATIBLE_BIDDING_STRATEGY_AND_BIDDING_STRATEGY_GOAL_TYPE"
                        },
                        "message": "The bidding strategy is incompatible with the campaign's bidding strategy goal type.",
                        "trigger": {
                            "int64Value": "6"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "app_campaign_setting"
                                },
                                {
                                    "fieldName": "bidding_strategy_goal_type"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "hKrd9CfkhTLgQkTk5B7ljA"
            }
        ]
    }
}

SR

unread,
Sep 24, 2024, 9:00:16 AM9/24/24
to Google Ads API and AdWords API Forum
I am also facing the same problem. Is this issue resolved? Please share the solution.

Google Ads API Forum Advisor

unread,
Sep 24, 2024, 2:51:59 PM9/24/24
to sar...@crigloo.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API support team.

We verified the provided logs and found that your request doesn’t contain the valid arguments; for example, BiddingStrategyType is an ‘Output only’ field, which means you can’t set this field while constructing the API request. So I would highly suggest you please refer to the method customers.campaigns.mutate before constructing the API request.

I hope it helps. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGY6t:ref" (ADR-00269330)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages