Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Passing the integration credentials to the Genesys cloud function data action code

    Posted 04-30-2025 14:49

    I have a Genesys cloud function data action which runs a node.js script that calls the aggregates API based on some inputs and returns the output. I am using event to pass the inputs from the data action to the code. However, I am getting error every time that credentials(client_id and client_secret) are empty. It seems even though I am expecting that the credentials for the integration being passed through event.credentials to automatically pass the creds including client_id and client_secret, it seems it is not being passed. The OAuth I am using for the integration is a client credential type standard Genesys cloud OAuth. Am I doing something wrong here? Is there a correct way of passing credentials to the data action function directly(without creating a .env file and storing the creds there)?


    #DataActions
    #Integrations
    #PlatformAPI
    #Uncategorized

    ------------------------------
    Mainak Patra
    ------------------------------


  • 2.  RE: Passing the integration credentials to the Genesys cloud function data action code

    Posted 04-30-2025 18:38

    You need to pass in the creds yourself. You can access then using ${credentials.clientId} and ${credentials.clientSecret} (or as defined in your integeration. Pass them in a parameters.

     



    ------------------------------
    Mike Hardie
    Developer
    ------------------------------



  • 3.  RE: Passing the integration credentials to the Genesys cloud function data action code

    Posted 05-02-2025 09:23

    Hi Mike, 

    I have tried this and it works perfectly. Does that mean since I am having to pass ${credentials.clientId} and ${credentials.clientSecret} through the request body template as a part of the event, I can't actually ever pass ${rawRequest} to the function if my function had to make any API call?

    Thanks & Regards,

    Mainak



    ------------------------------
    Mainak Patra
    ------------------------------



  • 4.  RE: Passing the integration credentials to the Genesys cloud function data action code

    Posted 05-02-2025 09:13

    Hi Mainak,

    If you haven't done so already, please look at this blog post on Genesys Cloud Functions.

    It's got a lot of really useful information.

    Thanks,
        John



    ------------------------------
    John Carnell
    Director, Developer Engagement
    ------------------------------



  • 5.  RE: Passing the integration credentials to the Genesys cloud function data action code

    Posted 05-02-2025 09:25

    Hi John,

    Thanks for this. This is really helpful!

    Thanks & Regards,

    Mainak



    ------------------------------
    Mainak Patra
    ------------------------------