SergioRota | 2018-04-17 14:40:38 UTC | #1
Hi,
I have to add a wrapup code in interaction by conversation Id: I try in this method:
Config Request: { "requestUrlTemplate": "/api/v2/conversations/calls/${input.CONVERSATIONID}/participants/${input.PARTECIPANTID}", "requestType": "PATCH", "headers": {}, "requestTemplate": "{\"wrapup\": {\"code\" : \"${input.WRAPUPID}\",\"notes\" : \"${input.NOTES}\"}}" }
But an error occurs:
{ "status": 400, "code": "bad.request", "message": "The request could not be understood by the server due to malformed syntax.", "messageParams": {}, "contextId": "1e27562b-5b65-4965-acb2-9ca3e46195a8", "details": [], "errors": [ { "status": 400, "code": "BAD_REQUEST", "message": "REST call for action execute failed. Message:Request to backend service failed. Response from web service: {\"status\":400,\"code\":\"not.a.user\",\"message\":\"This request requires a user context. Client credentials cannot be used for requests to this resource.\"} [1e27562b-5b65-4965-acb2-9ca3e46195a8] [1e27562b-5b65-4965-acb2-9ca3e46195a8]", "messageParams": {}, "details": [], "errors": [] } ] }
Thanks Sergio
tim.smith | 2018-04-17 14:42:58 UTC | #2
As the error message states, you may not assign a wrap up code using client credentials.
SergioRota | 2018-04-17 14:44:48 UTC | #3
Thank Tim
another method exist?
tim.smith | 2018-04-17 14:47:58 UTC | #4
Not for data actions; those can only use client credentials.
SergioRota | 2018-04-17 15:02:08 UTC | #5
Another question, can you tell me why in developer tools I can set the wrapup code in this method?
Check
Thanks Sergio
tim.smith | 2018-04-17 15:18:12 UTC | #6
When you log in to the dev tools site, you're authenticating as a user.
SergioRota | 2018-04-18 06:59:37 UTC | #7
So If I have to assign a specific wrapup code to interaction how do I do this?
Thanks :slightlysmilingface: Sergio
tim.smith | 2018-04-18 14:06:15 UTC | #8
The agent can either use the UI or you can build an app that allows the agent/user to authenticate and then make API requests for that user. You cannot do this with client credentials.
system | 2018-05-19 14:13:49 UTC | #9
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: 2748