Legacy Dev Forum Posts

 View Only

Sign Up

Error 403 During Testing of Data Action

  • 1.  Error 403 During Testing of Data Action

    Posted 06-05-2025 18:40

    N25 | 2018-01-24 03:27:19 UTC | #1

    Hi everyone,

    We are trying to implement a new data action that POSTs inputs to an external webservice which in turn we receive data based on those inputs.

    We have done several of these data actions before which all work but when we tried to test out this new data action we're always getting a "code error 403 - Not authorized". As before we never used any credentials when creating the web services integration.

    Please find below the data action configuration:

    INPUT CONTRACTS:

    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Request Schema", "description": "Schema to send SOAP request", "type": "object", "required": [ "uri", "method" ], "properties": { "uri": { "type": "string" }, "method": { "type": "string" }, "timeout": { "type": "string" }, "user": { "type": "string" }, "password": { "type": "string" }, "cliConfirmed": { "type": "string" }, "number": { "type": "string" }, "numberRegisterActivityID": { "type": "string" }, "phoneNumber": { "type": "string" } } }

    OUTPUT CONTRACTS:

    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Response Schema", "description": "Schema for the results of SOAP request", "type": "object", "properties": { "errorCode": { "type": "string" }, "errorMessage": { "type": "string" }, "effectiveDateTime": { "type": "string" }, "expiryDate": { "type": "string" }, "isConfirmedGracePeriodComplete": { "type": "string" }, "isInRegistered": { "type": "string" }, "value": { "type": "string" }, "hasCallbackInitiated": { "type": "string" }, "registrationRequestID": { "type": "string" }, "isSuccessful": { "type": "string" }, "pingStatusResult": { "type": "string" } }, "additionalProperties": true }

    REQUEST:

    { "requestUrlTemplate": "https://<webservice address here>", "requestType": "POST", "headers": { "ExampleHeader": "myTemplateHeaderValue" }, "requestTemplate": "{\"uri\": \"${input.uri}\",\"method\": \"${input.method}\",\"timeout\": \"${input.timeout}\",\"user\": \"${input.user}\",\"password\": \"${input.password}\",\"cliConfirmed\": \"${input.cliConfirmed}\",\"number\": \"${input.number}\",\"numberRegisterActivityID\": \"${input.numberRegisterActivityID}\",\"phoneNumber\": \"${input.phoneNumber}\"}" }

    RESPONSE:

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

    ERROR:

    { "status": 403, "code": "not.authorized", "message": "You are not authorized to perform the requested action.", "messageParams": {}, "contextId": "b537456d-6814-4d25-a5f6-e6b8289aef65", "details": [], "errors": [ { "status": 403, "code": "NOT_AUTHORIZED", "message": "REST call for action execute failed. Message:Request to backend service failed. To see error details, execute request in Postman, or other REST tools. [b537456d-6814-4d25-a5f6-e6b8289aef65] [b537456d-6814-4d25-a5f6-e6b8289aef65]", "messageParams": {}, "details": [], "errors": [] } ] }

    We created this data action on an org/edge that has other working actions with similar configurations and uses the same integration but we're still getting this error. Could the request url template address (intentionally not specified on this post) influence this? Thanks in advance for the help!


    Jason_Mathison | 2018-01-24 13:39:16 UTC | #2

    Have you verified that you can utilize this API in a tool like postman?

    Assuming that you can use the API manually, I would suggest seeing if this resource center article resolves your problem:

    https://help.mypurecloud.com/articles/custom-action-web-services-data-actions-integration-fails-unexpected-reason/

    The next option is to ask the owner of the web service if their web service has logs that would help diagnose the issue.

    If those options don't work then my final suggestion would be to open a support case where we could run tests against the actual endpoint to figure out what is going on.


    N25 | 2018-01-25 00:42:35 UTC | #3

    Hi Jason, thanks a lot for the suggestion however I just got word from the web service owner that they redeployed their API in their API gateway and it's now accessible like the ones we did before.

    Again, thanks for the help! Will take note of them just in case I may need them in the future.


    system | 2018-02-25 00:53:04 UTC | #4

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