OPERATION_NOT_PERMITTED_FOR_CONTEXT

82 views
Skip to first unread message

Igor Vinicius

unread,
Nov 29, 2023, 11:39:23 AM11/29/23
to Google Ads API and AdWords API Forum
Hello!
I'm trying integrate with Google Ads to manage client accounts. I create a Administrator account in Google Ads, i create an app in Google console to use OAuth2. The whole flow seems correct to me. The client enters my system, connects the Google account and gives permission to manage the Google Ads accounts, selects which account he wants to manage and then he would create and manage the campaigns. But when trying to create a budget in the test account I created, I receive the following error:
{
"message": "Request contains an invalid argument.",
"code": 3,
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com\/google.ads.googleads.v14.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": "ArYSSi9oTlKjluA9YtXjcw"
}
]
} But the error doesn't tell me what permission I don't have and I haven't found how to get that permission. I need help to solve this problem. The same happens when trying to create campaigns, so I need to know what needs to be configured.

Google Ads API Forum Advisor

unread,
Nov 29, 2023, 4:10:11 PM11/29/23
to igorvini...@gmail.com, adwor...@googlegroups.com
Hi,

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

By reviewing your concern, I understand that you are getting an error message “OPERATION_NOT_PERMITTED_FOR_CONTEXT”  when you are creating a budget in a test account.

Upon checking, I understand you have provided the error logs but kindly note that error logs are not sufficient to investigate the issue so please provide us complete API logs (request and response with request-id and request header) generated at your end and uncropped UI screenshot of the Google Ads account where you are facing the issue.

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.NetPHPPythonRuby 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.!5004Q02qVdF7:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages