We have a requirement to push a proactive notification to a customer who already has an open web messaging session. The idea is to trigger a script in when a specific backend event happens, then use the REST Proxy to send a message into that existing conversation.
I’m trying to use the endpoint POST /api/v2/interactions/messaging/conversations/{conversationId}/messages.
The issue is authentication and scope. The REST Proxy runs with the integration’s auth token. When I hit the endpoint, I get a 401 Unauthorized. I’ve checked the token, it’s valid for other APIs like getting user details. But for messaging conversations, it seems blocked.
Here is the JSON body I’m sending via the ASSIGN action:
{
"from": {
"id": "agent-123",
"name": "Support Bot"
},
"text": {
"type": "plain",
"content": "Your ticket has been updated."
}
}
Is there a specific capability or permission I need to grant the integration? Or is it not possible to send messages to an active session via the REST Proxy because of security constraints?
I tried adding X-Request-ID header, no change. Just the 401.