{ "StatusCode": 3,
"Details": "Request contains an invalid argument.",
"RequestId": "eRNDtNi3cNh5RiNBJPzz4g", "Failure":
{ "errors": [ { "errorCode": { "contextError":
"OPERATION_NOT_PERMITTED_FOR_CONTEXT" }, "message":
"The operation is not allowed for the given context.",
"trigger": { "stringValue": "NEGATIVE_KEYWORD shared
set type cannot be applied to channel type MULTIPLE" },
"location": { "fieldPathElements": [ {
"fieldName": "operations", "index": 0 } ] } }, {
"errorCode": { "contextError":
"OPERATION_NOT_PERMITTED_FOR_CONTEXT" }, "message":
"The operation is not allowed for the given context.",
"trigger": { "stringValue": "NEGATIVE_KEYWORD shared
set type cannot be applied to channel type MULTIPLE" }, "location":
{ "fieldPathElements": [ { "fieldName":
"operations", "index": 1 } ] } } ], "requestId":
"eRNDtNi3cNh5RiNBJPzz4g" } }
Ads UI error:
There was a problem making the changes you requested. Please try again later.
Thanks in advance
Hi,
Thanks for reaching out to the Google Ads API Team. I hope you are doing well today.
With regard to your concern, It seems you have encountered an OPERATION_NOT_PERMITTED_FOR_CONTEXT. That error said, The operation is not allowed for the given context. However, to further investigate this issue and provide an accurate recommendation, could you provide the complete request and response logs with request ID and request header generated on your end? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.
You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
Regards,
|
||||||
|
||||||
Hi,
I work with Heidi. Thanks for getting back to us.
For your question “If NEGATIVE_KEYWORD shared set type cannot be applied to channel type MULTIPLE, how it was set first?”, I’ve tried to add NEGATIVE_KEYWORD shared set type to my app campaign and it successfully added without any API error. Also, I tried to remove those added NEGATIVE_KEYWORD shared set type using REMOVE operation, and it succeeded as well. You may see below CURL:
curl -f --request POST "https://googleads.googleapis.com/v${API_VERSION}/customers/${CUSTOMER_ID}/campaignSharedSets:mutate" \
--header "Content-Type: application/json" \
--header "developer-token: ${DEVELOPER_TOKEN}" \
--header "login-customer-id: ${MANAGER_CUSTOMER_ID}" \
--header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \
--data "{ "customerId": "7633370648", "operations": [ { "remove": "customers/7633370648/campaignSharedSets/9407999930~7354130802" }, { "remove": "customers/7633370648/campaignSharedSets/9414378601~7354130802" }, { "remove": "customers/7633370648/campaignSharedSets/16334731431~7354130802" }, { "remove": "customers/7633370648/campaignSharedSets/16347151349~7354130802" } ] ,
'validateOnly':false,
"partialFailure": true
}
"
For REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include the HTTP response headers in the output.
You may try the above cURL, and see if it works on your end. If the error still persists, then you may provide us the most recent complete logs so that we can continue to investigate further.
Regards,
|
||||||
Hi,
In addition to above, could you provide the full logs for the API request where you have added NEGATIVE_KEYWORD shared set type to your app campaign so that I can discuss this with my rest of team.
Kindly provide the complete logs via reply privately to author option.
Regards,
Hi,
Thank you for trying out the provided suggestions. Allow me to raise this issue to my rest of the team. We will reach out to you once we have any updates.
Regards,
|
||||||