OPERATION_NOT_PERMITTED_FOR_CONTEXT

81 views
Skip to first unread message

Paulo Silva

unread,
Mar 25, 2024, 3:04:55 PM3/25/24
to Google Ads API and AdWords API Forum
hi

i try to send block ip for campaing

* Preparing request to https://googleads.googleapis.com/v15/customers/5932574280/campaignCriteria:mutate
* Current time is 2024-03-25T14:40:47.850Z
* Enable automatic URL encoding
* Using default HTTP version
* Enable timeout of 30000ms
* Enable SSL validation
* Enable cookie sending with jar of 12 cookies
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* 17 bytes stray data read before trying h2 connection
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
*   Trying 2800:3f0:4001:830::200a:443...
* Connected to googleads.googleapis.com (2800:3f0:4001:830::200a) port 443 (#3)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: /etc/ssl/cert.pem
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=upload.video.google.com
*  start date: Feb 26 08:18:27 2024 GMT
*  expire date: May 20 08:18:26 2024 GMT
*  subjectAltName: host "googleads.googleapis.com" matched cert's "*.googleapis.com"
*  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* Using Stream ID: 1 (easy handle 0x1040096f200)
* TLSv1.2 (OUT), TLS header, Supplemental data (23):

> POST /v15/customers/5932574280/campaignCriteria:mutate HTTP/2
> Host: googleads.googleapis.com
> user-agent: insomnia/8.6.1
> content-type: application/json
> accept: */*
> content-length: 170

* TLSv1.2 (OUT), TLS header, Supplemental data (23):

| {"customer_id":"5932574280","operations":[{"create":{"campaign":"customers/5932574280/campaigns/20717377421","negative":true,"ip_block":{"ip_address":"86.163.43.213"}}}]}

* We are completely uploaded and fine
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):

< HTTP/2 400
< request-id: InVoUjxhE7_vjMQaL09Pxw
< vary: X-Origin
< vary: Referer
< vary: Origin,Accept-Encoding
< content-type: application/json; charset=UTF-8
< date: Mon, 25 Mar 2024 14:40:48 GMT
< server: ESF
< cache-control: private
< x-xss-protection: 0
< x-frame-options: SAMEORIGIN
< x-content-type-options: nosniff
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
< accept-ranges: none


* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Received 998 B chunk
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection #3 to host googleads.googleapis.com left intact

but i receive this response

{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.ads.googleads.v15.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"contextError": "OPERATION_NOT_PERMITTED_FOR_CONTEXT"
},
"message": "The operation is not allowed for the given context.",
"trigger": {
"stringValue": "EXPRESS(EXPRESS_SMART)"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "ip_block"
}
]
}
}
],
"requestId": "InVoUjxhE7_vjMQaL09Pxw"
}
]
}
}

can i help me?

Google Ads API Forum Advisor

unread,
Mar 25, 2024, 6:58:05 PM3/25/24
to pa...@extractify.com.br, adwor...@googlegroups.com
Hi,

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

I will check with our team regarding your issue and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.

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

Thanks,
 
Google Logo Google Ads API Team


Google Ads API Forum Advisor

unread,
Mar 26, 2024, 9:14:18 AM3/26/24
to pa...@extractify.com.br, adwor...@googlegroups.com
Hi,

Hope you are doing well. 

I could see that the campaign: 20717377421 has status 'Removed', this is the reason you are facing an error. Please note that it is not possible to perform any mutate operation on the removed campaigns. Hope this helps.
Reply all
Reply to author
Forward
0 new messages