Hi everyone,

I'm trying to create a Performance Max campaign using the Google Ads API 
with a **real user account** (not a test MCC) authenticated via **OAuth**, 
but I'm getting this error:

{
"errors": [
{
"error_code": {
"context_error": "OPERATION_NOT_PERMITTED_FOR_CONTEXT"
},
"message": "The operation is not allowed for the given context.",
"location": {
"field_path_elements": [
{ "field_name": "operations", "index": 0 }
]
}
}
],
"request_id": "xxxx"
}


###  Here's what I'm doing:

1. The user logs in via Google OAuth and authorizes scopes.
2. I exchange the code for access and refresh tokens.
3. I call `customers:listAccessibleCustomers` using the `access_token` to 
get the user's customer ID.
4. I use that customer ID + the refresh token to call the API using the 
`google-ads-api` Node.js client.
5. I create:
   - A campaign budget
   - A Performance Max campaign (channel type: `PERFORMANCE_MAX`)
   - A conversion action (type: `WEBPAGE`)
   - An asset group with final URLs
   - Assets: headline, description, image, and YouTube video

### 🔧 Setup:

- Developer Token: **Not approved for production yet (test mode only)**
- Customer ID: **Real user account**, obtained via OAuth (not a test 
account, no red "test account" banner)
- OAuth Scopes used: `https://www.googleapis.com/auth/adwords`
- API version: `v18`
- Library: `google-ads-api` (Node.js)

---

### My questions:

1. Is this error caused by using a **test-mode Developer Token** with a 
**real user account**?
2. Do I **need a production-approved Developer Token** to create 
Performance Max campaigns on real user accounts via OAuth?
3. Can I only use the test token with **test accounts** (those with the red 
"test account" banner)?
4. Does the real user account require specific permissions or settings to 
allow campaign creation?
5. Is there any workaround to test the full campaign creation flow 
(including asset groups and conversion actions) without production token 
access?

I’ve been stuck with this for over a week and would really appreciate any 
clarification from the team or the community 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/5d827907-389e-4e0d-a17d-8213c98871e5n%40googlegroups.com.
  • Pe... alisson blaas
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... alisson blaas
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to