Test Account Campaign Creation Fails with OPERATION_NOT_PERMITTED_FOR_CONTEXT and Possible NOT_ADS_USER Error

5 views
Skip to first unread message

Patrick Abogado

unread,
7:27 AM (16 hours ago) 7:27 AM
to Google Ads API and AdWords API Forum
Hey,

I'm attempting to create Google Ads campaigns via the Google Ads API on a test account (123-456-7890) linked to a manager account (111-111-1111). 

The Problem:
I am getting "OPERATION_NOT_PERMITTED_FOR_CONTEXT" and "NOT_ADS_USER". I followed the directions here for the not_ads_user problem by  generating OAuth credentials using the manager account.


Campaign creation requests fail with OPERATION_NOT_PERMITTED_FOR_CONTEXT and NOT_ADS_USER with the message: "The Google account (@gmail.com user) that generated the OAuth access tokens is not associated with any Ads accounts. Create a new account, or add the Google account to an existing Ads account."

Both the test account and manager account were created using the same email. 

  Additional Context:
  - I tried to create a campaign manually but it says i have no account.
  - I went to create a child account under the test account, but it said I had no billing.
  - When attempting to access billing settings on the test account, we get a permission error saying:"Your account's access level doesn't include billing information"
  - The exact email (exa...@gmail.com) used to generate the OAuth token is shown in the test account's settings. 
  - The Google Ads API documentation lacks clarity on whether test accounts require billing for API writes, or if there's a specific configuration needed for OAuth tokens on child test accounts.

Question:
Is this a billing issue, a misconfiguration with the OAuth/account linkage, or a limitation of test accounts? What's the proper setup for API campaign creation on test accounts?

Google Ads API Forum Advisor

unread,
12:15 PM (12 hours ago) 12:15 PM
to pat...@mbedsf.com, adwor...@googlegroups.com

Hi,

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

It seems this issue is not a billing issue for campaign creation on a test account but rather a misconfiguration with the OAuth/account linkage and the user's access level to the test client account. The error messages strongly suggest the Google user associated with the OAuth token does not have the necessary permissions within the client account itself. Based on the provided information, it appears that you’ve encountered the "OPERATION_NOT_PERMITTED_FOR_CONTEXT’ error while attempting to create a campaign. This error occurs when an operation is not allowed within the current context. The NOT_ADS_USER error triggers when the provided email address/user account is not associated with any Google Ads account. To know the proper steps to create the campaigns in the test account, please refer to the Create test accounts and campaigns API documentation for step-by-step guidance. This code example explains how you programmatically create the campaign in the Google Ads account via the API.

To know the exact reasons, kindly provide the complete API logs (request and response logs with request-id and request header) generated at your end when creating the campaigns via the API in the test account and observe the specified errors.

Kindly note that you have to enable logging if you are using a client library. You can refer to the guides for 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 the Reply privately to the author option or direct private reply to this email.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-10-23 16:14:24Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vRaiR:ref" (ADR-00336356)



Reply all
Reply to author
Forward
0 new messages