Problem
We need to scope an client to specific divisions because we run a multi-tenant BPO setup. The docs mention limiting access, but the Python SDK isn’t playing nice. I’m trying to create the client via create_oauth_client and passing the division IDs in the request body, but the API keeps rejecting it.
Code
Here’s the snippet. The division_ids field feels wrong here. Maybe I’m missing something obvious.
from genesyscloud.platform import PlatformApi
api = PlatformApi(api_instance)
body = {
"name": "BPO-Client-01",
"description": "Scoped to Division A and B",
"division_ids": ["div-uuid-1", "div-uuid-2"]
}
result = api.create_oauth_client(body)
Error
The response comes back with a 400 Bad Request. Nothing in the logs about why.
{
"message": "division_ids is not allowed in the client creation schema",
"status": 400
}
Question
Is there a different endpoint or SDK method to apply division scoping after creation? The update_oauth_client call also fails with the same schema error. I’ve checked the raw REST doc and it mentions division_id on the client object, but the SDK wrapper seems to strip that out or the schema validation on the backend is strict.
How do we actually lock a client to a division using the Python SDK?
The token generation works fine if I leave it global, but we can’t do that for security. Just stuck on this scoping part.