OPERATION_NOT_PERMITTED_FOR_CONTEXT

32 views
Skip to first unread message

MEGANATHAN P

unread,
Apr 27, 2023, 10:44:40 AM4/27/23
to Google Ads API and AdWords API Forum
Hello Team,

Request ,
{
  "operations": [
    {
      "create": {
        "deliveryMethod": "STANDARD",
        "type": "STANDARD",
        "period": "DAILY",
        "amountMicros": 799990000,
        "name": "Test_google_ads_google_display20230427181647",
        "explicitlyShared": true
      }
    }
  ]
}
i  am getting error below error form thr google ads api how to fox this
response:

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.ads.googleads.v13.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
                }
              ]
            }
          }
        ],
        "requestId": "tCsl9-nVnNKiidFsHgt-6w"
      }
    ]
  }
}


Thanks!

Google Ads API Forum Advisor

unread,
Apr 27, 2023, 3:55:44 PM4/27/23
to meganath...@gmail.com, adwor...@googlegroups.com

Hi,

I'm from the Google Ads API team. I'll try my best to assist you.

Can you provide more details on what you're trying to achieve? If possible, kindly provide us with a UI screenshot of a similar ad group that you would like to replicate via API. You may send it to us via Reply privately to author option. I'm asking as I've noticed that the deliveryMethodperiodamountMicrosexplicitlyShared fields does not exist in an AdGroup resource as you can see here (https://developers.google.com/google-ads/api/reference/rpc/v13/AdGroup). Furthermore, the STANDARD value you specified for the type field is not part of the available enum values that the field accepts. Here's a link (https://developers.google.com/google-ads/api/reference/rpc/v13/AdGroupTypeEnum.AdGroupType) to the list of supported values.

Regards,

Google Logo Google Ads API Team


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