Error with Campaign Creation

131 views
Skip to first unread message

Samantha Kapai

unread,
Sep 15, 2022, 5:31:02 PM9/15/22
to adwor...@googlegroups.com
Hello Google Ads Team

I am trying to create a campaign using google ads api but get an error message. Could you please advise?

Below are the details

Url: https://googleads.googleapis.com/v11//customers/8799276370/campaigns:mutate

Request:

{
   "operations":[
      {
         "create":{
            "name":"TestCampaignSept15-3",
            "status":"PAUSED",
            "campaignBudget":"customers/8799276370/campaignBudgets/11556974336",
            "advertisingChannelType":"SEARCH",
            "resourceName":"",
            "networkSettings":{
               "targetGoogleSearch":true,
               "targetSearchNetwork":true,
               "targetContentNetwork":true,
               "targetPartnerSearchNetwork":false
            },
            "manualCpc":{
               "enhancedCpcEnabled":true
            }
         }
      }
   ]
}


Response:

"error": {

                "code": 400,

                "status": "INVALID_ARGUMENT",

                "details": [

                    {

                        "@type": "type.googleapis.com/google.rpc.BadRequest",

                        "fieldViolations": [

                            {

                                "description": "Invalid JSON payload received. Unknown name \"operations\": Cannot find field."

                            }

                        ]

                    }

                ],

                "message": "Invalid JSON payload received. Unknown name \"operations\": Cannot find field."

            }

Google Ads API Forum Advisor

unread,
Sep 15, 2022, 11:43:26 PM9/15/22
to samanth...@sojern.com, adwor...@googlegroups.com
Hi Samantha,

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

Moving forward to your concern, I tried to replicate your code and I found out that the reason is that this "resourceName":"". With that being said, try to remove it and then try to run the code again.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


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