Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  How can i create a data action if the output is in HTML format?

    Posted 10-10-2022 07:53
    No replies, thread closed.

    Hi all,
    I am trying to create a data action for an API. But i am unable to create it since there is an error which says content type is not supported. Please guide me how i can work on it since API owner cannot change the output to JSON.

    Appreciate your response.


    #ArchitectureandDesign
    #Integrations

    ------------------------------
    Anush C Shetty
    SERVION T GLOBAL SOLUTIONS LIMITED
    ------------------------------


  • 2.  RE: How can i create a data action if the output is in HTML format?

    Posted 10-10-2022 16:13
    No replies, thread closed.
    The short answer is you will need to build a new service in the middle that translates the HTML response into JSON, as Genesys will ONLY accept JSON.

    ------------------------------
    Brad Murlin
    Zillow, Inc.
    ------------------------------



  • 3.  RE: How can i create a data action if the output is in HTML format?

    Posted 10-11-2022 13:32
    No replies, thread closed.
    This may be a shot in the dark, but when I ran into this in the past when querying API endpoints and got a similar error I did some research and found an article that suggested to add a User-Agent header, to trick the endpoint to think it was a web browser asking for the response.  

    I use PowerShell to build my API scripts, here is how I set the headers.  Maybe you can add a new "User-Agent" header and use the highlighted property shown in the screenshot below.  


    Here is the text for you to copy:  "User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12"

    ------------------------------
    Jose Carlos Albor
    Genesys - Employees
    ------------------------------