Send an outbound agenteless email via API

Hello everyone,
i'm trying to use the following API --> /api/v2/conversations/emails/agentless to send an outbound email automatically from an InQueue IVR flow.
Here the body for the API :

{
"senderType": "",
"conversationId": "",
"fromAddress": {
"email": "",
"name": ""
},
"toAddresses": [
{
"email": "",
"name": ""
}
],
"replyToAddress": {
"email": "",
"name": ""
},
"subject": "",
"textBody": "",
"htmlBody": ""
}.

I compile the body in the following way (consider that the only required field are senderType
, fromAddress , toAddresses) :

{
"senderType": "Outbound",
"fromAddress": {
"email": "The Genesys email address set-up under the contact-center email section of Gcloud"
},
"toAddresses": [
{
"email": "My email address"
}
]
} .

But i have the response below :

"message": "This request requires a non-user context. User token cannot be used for requests to this resource."

What is the reason and how i can fix it?
Thanks in advance,
Alessandro

Hi,

What is your authorization method? According to the error message, the request requires an non-user context, which means using an authorization method that does not provide a user context such as Client Credentials Grant. Other authorization methods like Authorization Code Grant or Implicit Grant provide a user context for requests.

Thanks,

Mike

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.