markoan | 2023-11-23 04:51:46 UTC | #1
We are getting 400 responses from the /api/v2/conversations/messages/inbound/open endpoint when sending receipt requests.
Error: genesys.postMessage: Posting message failed (400: Bad Request)!
{ "message": "The Open Messaging inbound receipt 'id' field is not a valid id format", "code": "bad.request", "status": 400, "contextId": "43b5c039-c93c-438d-a9a2-5a9a1fdd2dd0", "details":[], "errors":[]}
The body of the request is:
{
"id":"c0d2c441-3b09-4459-be0b-34313de68c5f",
"channel": {
"platform":"Open",
"type":"Private",
"messageId":"c0d2c441-3b09-4459-be0b-34313de68c5f",
"to": {
"id":"50688386304",
"idType":"Phone"
},
"from": {
"id":"e0ef3b76-3171-4de1-9e43-6c766302be99",
"idType":"Opaque"
},
"time":"2023-11-22T16:39:59Z"
},
"text":"",
"type":"Receipt",
"status":"Delivered",
"direction":"Outbound",
"isFinalReceipt":true
}
The documentation states the id should be the id of the original message, which we use. But the error says it's not a valid format.
I am aware this is not an error on the platform but we need some direction on the correct id format to use.
Greg_Boston | 2023-11-27 12:56:35 UTC | #2
@markoan I believe the top level id you have there is wrong. "id":"c0d2c441-3b09-4459-be0b-34313de68c5f", this field should not be a UUID. I believe what you are wanting to do here is to inbound a receipt from your open messaging webhook service that is going to tell Genesys Cloud that you received the message and it was Delivered. This will allow the agent on the Conversation, to see that the message was delivered correctly. To accomplish this you would want to take the outbound message's body.id or body.channel.messageId you received in the outbound (text for instance) message the agent sent to your webhook. And use that id when you inbound the receipt back to Genesys Cloud.
system | 2023-12-27 12:57:16 UTC | #3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 23301