Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Web Services Data Action rejecting JWT login due to text/plain response

    Posted 20 days ago

    Hi all,

    We're currently integrating BMC Helix ITSM with Genesys Cloud using Web Services Data Actions.

    The authentication endpoint (/api/jwt/login) returns a valid JWT token, however the response comes back as:

    Content-Type: text/plain

    The body is simply the raw JWT string.

    When calling this from Genesys Cloud, the Data Action fails before mapping because the platform expects application/json responses.

    We attempted to:

    • Use Translation Map to capture the raw body ("$")
    • Wrap the response using a Success Template
    • Adjust headers (Accept / Content-Type)

    However, the call appears to be rejected at the HTTP validation layer before the mapping logic executes.

    My questions:

    1. Does Genesys Cloud strictly enforce application/json before running the Translation Map?
    2. Has anyone successfully consumed a text/plain JWT login endpoint using Web Services Data Actions?
    3. Is there any supported workaround without introducing middleware?

    We're evaluating whether to:

    • Request the API provider to return JSON instead
    • Use Basic authentication (if allowed)
    • Introduce a lightweight proxy

    Appreciate any insights from those who've handled similar integrations.

    Thanks!


    #Integrations

    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------


  • 2.  RE: Web Services Data Action rejecting JWT login due to text/plain response
    Best Answer

    Posted 19 days ago

    First thing you could try is to specifically add an "accept" header to your auth action with a value of "application/json". It is possible that will get the endpoint to return the JWT as JSON.

    1. Does Genesys Cloud strictly enforce application/json before running the Translation Map?

    Yes, which makes the answers to questions 2 and 3 no.

    Feel free to post a feature request for text/plain support at https://genesyscloud.ideas.aha.io/

    If adding an accept header doesn't solve this issue, any of your potential solutions seem reasonable.



    ------------------------------
    --Jason
    ------------------------------



  • 3.  RE: Web Services Data Action rejecting JWT login due to text/plain response

    Posted 18 days ago
    Edited by Phaneendra Avatapalli 18 days ago

    Thanks for the suggestion.

    Yes, I did try explicitly setting the Accept: application/json header on the auth action. Unfortunately, the /api/jwt/login endpoint still returns the token as text/plain.

    At this stage, it looks like our options are:

    • Adjust authentication on the BMC side (e.g., enable Basic without SSO redirect or support OAuth), or
    • Introduce a small middleware layer to wrap the JWT in a JSON response.

    Thank you for the reply.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 4.  RE: Web Services Data Action rejecting JWT login due to text/plain response

    Posted 18 days ago

    Found the answer Genesys Cloud Functions https://help.genesys.cloud/articles/about-the-genesys-cloud-function-data-actions-integration/



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------