Trying to kick off an outbound call on behalf of a logged-in agent using the Conversations API. The goal is to bypass the dialer and just fire a direct call from our custom integration.
We’re using the Genesys Cloud Python SDK. The agent is authenticated via OAuth2 client credentials, and we’ve verified the user has the calls:outbound permission set.
Here’s the snippet:
from genesyscloud import ConversationApi
conv_api = ConversationApi(config)
call_request = {
"from": {
"phoneNumber": "+15550199",
"name": "Support Line"
},
"to": [
{
"phoneNumber": "+15550123",
"name": "Customer"
}
],
"wrapUpCode": "12345",
"queueId": "abc-123-xyz"
}
try:
response = conv_api.post_conversations_calls(body=call_request)
print(f"Call initiated: {response.id}")
except Exception as e:
print(f"Error: {e}")
The API throws a 403 Forbidden immediately. The error message is generic: Access denied. I’ve checked the role assignments on the agent side and the service account side. Both have calls:outbound and calls:manage.
Is there a specific header or context we’re missing? Or does this endpoint strictly require the caller to be an agent with an active login session rather than a service account token? The docs are light on the auth requirements for this specific POST method.