Creating Search Campaign with Target CPA - OPERATION_NOT_PERMITTED_FOR_CONTEXT Error

56 views
Skip to first unread message

Jerson Dela Cerna

unread,
Jun 20, 2024, 6:44:00 AM6/20/24
to Google Ads API and AdWords API Forum
object(Google\ApiCore\ApiException)#14219 (11) {
  ["message":protected]=>
  string(1117) "{
    "message": "Request contains an invalid argument.",
    "code": 3,
    "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.",
                    "location": {
                        "fieldPathElements": [
                            {
                                "fieldName": "operations",
                                "index": 0
                            },
                            {
                                "fieldName": "create"
                            },
                            {
                                "fieldName": "target_cpa"
                            }
                        ]
                    }
                }
            ],
            "requestId": "ntyPPe4s_iYmkbkAdFR4uA"
        }
    ]
}"

Google Ads API Forum Advisor

unread,
Jul 26, 2024, 10:03:31 AM7/26/24
to jerson.del...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

I understand that you are getting OPERATION_NOT_PERMITTED_FOR_CONTEXT error, to assist you further please provide us with complete API request and response logs with request-id and request header generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag. 

You can send the details via Reply privately to the author option, or direct private reply to this email.

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

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages