Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Jwt Token

    Posted 07-27-2023 11:20

    Hi Team,

    I need a help to generate JWT token to integrate for payment integration.

    Generate JWT and sign with a private key

    Steps to get Jwt encoded key:

    1. Needs to generate the jwt encoded key using JWT libraries in Nodejs using the below provided info.

    Go to JSON Web Tokens - jwt.io  and updated the header and payload.

    In payload data iat value needs to take current Unix Timestamp. Fyi Unix Time Stamp - Epoch Converter

    1. After filling in the data , copy the encoded key.
    2. Use the encoded key to call the https://secure4.paymentus.com/api/token/AFLC API to get the JWT key for next API calls.


    Now the issue is we are unable to write the nodejs code in genesys to generate the jwt encoded key. Is there a way to generate jwt encoded key in Genesys?


    #ArchitectureandDesign
    #Integrations
    #Security

    ------------------------------
    Raghavapvds
    ------------------------------


  • 2.  RE: Jwt Token

    GENESYS
    Posted 07-28-2023 10:55

    Generating JWTs is a little outside the scope of what is built into Genesys Cloud.  However, you can use the AWS Lambda Data Action integration to call an AWS Lambda, and once in the Lambda you can execute any NodeJS code that you might need to be able to integrate to the payment gateway.



    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 3.  RE: Jwt Token

    Posted 07-28-2023 11:28

    Hi Jim,

    Thanks for your response.

    But Genesys cloud was not support JWT token directly. And kindly let me know what are the options available other than lambda function.



    ------------------------------
    Raghavapvds
    ------------------------------



  • 4.  RE: Jwt Token

    GENESYS
    Posted 07-28-2023 14:22

    You are correct, and that is what I said, Genesys Cloud does not support JWT directly.  The only way you will be able to support a payment gateway that requires you to generate a JWT for authentication is to use either the AWS Lambda Data Actions or Web Service Data Actions to call a service that is external to Genesys Cloud to execute the code that you need to handle that payment.



    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources