Legacy Dev Forum Posts

 View Only

Sign Up

Error 403 when executing PureCloud Data Action

  • 1.  Error 403 when executing PureCloud Data Action

    Posted 06-05-2025 18:40

    Anna_B | 2017-12-11 19:34:39 UTC | #1

    Hello, we are implementing a data action to automate the sending of DTMF tones. We obtain a code error 403 - Not authorized when executing the validation test within the PureCloud UI. The role that we assigned to the oAuth Client has already granted all existing permissions (we built a super-role just for this test). ¿Could you make us any suggestion or issue to be reviewed? Please find below the data action configuration:

    INPUT CONTRACTS:

    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Send DTMF Tones", "description": "Send DTMF Tones", "type": "object", "required": [ "conversationId", "participantId", "tones" ], "properties": { "conversationId": { "type": "string", "description": "conversationId" }, "participantId": { "type": "string", "description": "participantId" }, "tones": { "type": "string", "description": "tones" } } }

    OUTPUT CONTRACTS:

    { "$schema": "http://json-schema.org/draft-04/schema#", "properties": {} }

    REQUEST:

    { "requestUrlTemplate": "/api/v2/conversations/${input.conversationId}/participants/${input.participantId}/digits", "requestType": "POST", "headers": { "Content-Type": "application/json" }, "requestTemplate": "{\"digits\": \"${input.tones}\"}" }

    RESPONSE:

    { "translationMap": {}, "successTemplate": "${rawResult}" }

    Thank you in advance.


    Jason_Mathison | 2017-12-11 19:52:53 UTC | #2

    Could you provide a correlation ID?


    Anna_B | 2017-12-11 20:43:06 UTC | #3

    Hi Jason, please find attached the context ID obtained in the response: 0c8f746d-0d75-4f22-932e-7f4e12bb0fe8

    I just made the trial call and data action execution right now. Please let me know if you need any additional information.

    Thank you very much.


    Jason_Mathison | 2017-12-11 20:43:07 UTC | #4

    The issue appears to be that in order to use the APIs like digits, mute, hold etc. the caller of the API has to be a user who is a participant in the conversation. As your data action would be using a client credential, it won't be capable of calling these types of APIs. I am creating a ticket to update our API documentation to include this information.

    A developer from the conversation team couldn't come up with a workaround for this offhand. What exactly are you trying to accomplish?


    Anna_B | 2017-12-11 20:49:49 UTC | #5

    Hello Jason, we are trying to automate the sending of DTMF tones through scripts, in the way that the Agent does not need to dial the code, just click on the button for sending the tones to an external IVR.

    ¿It would be possible in some way from script? We can't use the data action from Architect, because the Agent need to send the DTMF tones during a consult transfer to an external IVR (while the Customer is on hold), and finally complete the transference after introducing the DTMF.

    Thank you.


    tim.smith | 2017-12-11 20:54:06 UTC | #6

    If you embed a web page in the script, the web page can authenticate the agent and then that web page (or the page's back end service) can make authenticated API requests as that user. There are a lot of different ways to build such a solution, but the end goal is to use build an external app/integration that authenticates the agent and makes API requests using that token. The auth process for this app must use one of the implicit, token, or saml grant types.


    Anna_B | 2017-12-11 21:08:10 UTC | #7

    Thank you Tim and Jason, we will review the requirements for this external web application with the development team, we will come back for more checkings if needed.


    system | 2018-01-11 21:08:10 UTC | #8

    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: 2222