We are trying to automate sending a canned response during an active chat session using a script. The goal is to inject a standard greeting without agent intervention when specific IVR criteria are met.
I’ve set up a REST Proxy action in . It constructs the JSON payload and hits the endpoint. The token generation works fine; I can see the valid bearer token in the debug log. The conversation ID is pulled from the current interaction context.
Here is the payload I’m sending:
{
"text": "Thank you for contacting support. An agent will be with you shortly.",
"type": "text"
}
The request fails with a 403 Forbidden error. The response body is empty.
Steps tried:
- Verified the OAuth token has the
conversations:messaging:writescope. It does. - Checked the conversation status. It is
ACTIVE. - Tried sending a plain string instead of the JSON object. Same result.
- Confirmed the user associated with the token has the necessary permissions in the admin console.
- Tested the same endpoint via Postman using the same token. It works there.
The script seems to be the bottleneck. Is there a specific header missing in the REST Proxy configuration? Or is the runtime sandbox blocking outbound writes to the messaging channel?
The script runs without throwing a error, just returns the 403 from the API call.