AClivati | 2021-12-03 09:06:09 UTC | #1
ciao,
when we try to pickup a chat using api patch:
/api/v2/conversations/chats/{conversationId}/participants/{participantId}
as explained here : https://developer.genesys.cloud/api/digital/webchat/agentchat
passing conversationId and participantId with body:
{ "state": "connected" }
we get the error: { "message": "Failed to update properties on conversation participant.", "code": "conversation.participant.update.failed", "status": 500, "contextId": "81eef5a8-7890-43bd-afe0-0e812f3ca92c", "details": [], "errors": [ { "message": "An internal conversation service error has occurred. Please contact support. Message: 500 : [{\"errorCode\":\"chat.error\",\"status\":500,\"correlationId\":\"81eef5a8-7890-43bd-afe0-0e812f3ca92c\",\"userMessage\":\"An error has occurred. Please contact support. Message: Request method 'PUT' not supported\",\"userParamsMessage\":\"An error has occurred. Please contact support. Message: {message}\",\"userParams\":[{\"key\":\"message\",\"value\":\"Request method 'PUT' not supported\"}]}]", "code": "internal.server.error", "status": 500, "details": [ { "fieldName": "state" } ]
where do we go wrong? thanks
Jerome.Saint-Marc | 2021-12-03 10:20:19 UTC | #2
Hello,
You are supposed to use a PATCH. PATCH /api/v2/conversations/chats/{conversationId}/participants/{participantId}
Your error message says you are using a PUT: "Request method 'PUT' not supported"
Regards,
AClivati | 2021-12-03 11:07:55 UTC | #3
ciao Jerome,
but we are using a patch, :
that error in the logs is strange. thanks
Jerome.Saint-Marc | 2021-12-03 12:32:18 UTC | #4
Finally found the reason.
The page you are looking at (i.e. https://developer.genesys.cloud/api/digital/webchat/agentchat) relates to Widget v2 (WebChat v2).
And you seem to create a Widget v1.0/WebChat v1 chat and try to answer it. I get the same answer/failure than you when trying to answer a WebChat v1 via API.
Answering WebChat v1 via Platform API is not supported. The support for PATCH /api/v2/conversations/chats/{conversationId}/participants/{participantId} is for WebChat v2 (hence why the it is explained in the Agent Chat page related to Widget v2 - i.e. WebChat v2).
Regards,
AClivati | 2021-12-03 12:23:56 UTC | #5
thank you so much Jerome!
system | 2022-01-03 12:24:27 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 12831