Legacy Dev Forum Posts

 View Only

Sign Up

Data Action Integration by requestTemplate

  • 1.  Data Action Integration by requestTemplate

    Posted 06-05-2025 19:20

    alialjohani | 2018-12-24 07:30:06 UTC | #1

    Hello Everyone,

    I am wondering what is going wrong in my integration.

    As you can see in the following image, I am able to successfully consume the API by Postman:

    However, in PureCloud, it seems there is some thing I missed.

    Is it using requestTemplate directly correct?

    Best Regards, Ali


    Jason_Mathison | 2018-12-25 02:07:23 UTC | #2

    Hi Ali,

    Please provide us what error you are getting, a correlation ID of a failed test, and an export of your action (with any sensitive parts redacted).

    --Jason


    alialjohani | 2018-12-25 07:56:40 UTC | #3

    Dear Jason,

    They provide me now a different Web API which accepts Key-Value pairs. However, I am still having an issue !. It works perfectly in Postman/RESTED based on 'application/json', but in PureCloud the issue as following:

    { "status": 500, "code": "internal.server.error", "message": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "messageParams": {}, "contextId": "e89640cc-e851-47d5-9397-98cbc5f976e4", "details": [], "errors": [ { "status": 200, "code": "INTERNALSERVERERROR", "message": "REST call for action execute failed. Message:We were unable to process the response from the remote endpoint (mobily.ws) because it had a 'content-type' header of 'text/html; charset=UTF-8' instead of the required value of 'application/json'. [e89640cc-e851-47d5-9397-98cbc5f976e4]", "messageParams": {}, "details": [], "errors": [] } ] }

    Your advice is appreciate it.

    Best Regards, Ali


    tim.smith | 2018-12-27 15:12:16 UTC | #4

    alialjohani, post:3, topic:4246
    REST call for action execute failed. Message:We were unable to process the response from the remote endpoint (mobily.ws) because it had a 'content-type' header of 'text/html; charset=UTF-8' instead of the required value of 'application/json'. [e89640cc-e851-47d5-9397-98cbc5f976e4]

    It needs to send application/json as the content type in the response. Data actions don't support other content types.


    system | 2019-01-27 15:12:21 UTC | #5

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