Help requested with OpenMessage inbound message creation

Hi,
I am trying to use the open messaging API to send an inbound (open) message to an ACD queue.
I created an open messaging integration and can use this to send 'agentless' outboud messages to my third party middleware. Now I'd like to send responses from my middleware to an agent. I have a working OAuth client credientials grant (used successfully in the outbound flow). However when I try submitting a message (see the message format below) I get an exception (see below). What am I missing here ? Can anyone point me in the right direction ?

class OpenNormalizedMessage {
id: dummyId_1669484178356
channel: class OpenMessagingChannel {
id: null
platform: null
type: Private
messageId: 1669484178355
to: class OpenMessagingToRecipient {
nickname: null
id:
idType: null
firstName: null
lastName: null
image: null
email: null
}
from: class OpenMessagingFromRecipient {
nickname: null
id: dummyFromId_1669484178355
idType: Opaque
firstName: dummy
lastName: user
image: null
email: null
}
time: Sat Nov 26 18:36:18 CET 2022
metadata: null
}
type: Text
text: This is the payload at 1669484178356
content: []
events: []
status: null
reasons: []
isFinalReceipt: true
direction: Inbound
metadata: null
}

Code throws this exception

Exception when calling ConversationsApi#postConversationsMessagesInboundOpen
com.mypurecloud.sdk.v2.ApiException: error
at com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:705)
at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:757)
at com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:868)
at com.mypurecloud.sdk.v2.api.ConversationsApi.postConversationsMessagesInboundOpen(ConversationsApi.java:12850)
at com.mypurecloud.sdk.v2.api.ConversationsApi.postConversationsMessagesInboundOpen(ConversationsApi.java:12819)
at com.primecontact.iwd.message.InboundOpenMessage.main(InboundOpenMessage.java:61)

Regards,
Sean

Found my problem by printing the raw body of the exception thrown by the API.

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