Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Automate API Key update for data actions

    Posted 03-16-2022 09:57
    No replies, thread closed.
    I'm wondering if it is possible to automate the updating of API keys for data actions. When using an API to do a lookup from an IVR flow via a data action, the API key provides the authentication/authorization for the API. Since many clients have theirs set to expire every so often, updating it is a manual process which requires sharing the key etc. We would like to automate the process via another API Call using the existing key before it expires etc. Has anyone done this before?
    #Integrations
    #Roadmap/NewFeatures
    #Unsure/Other

    ------------------------------
    Charles Skowron
    ------------------------------


  • 2.  RE: Automate API Key update for data actions

    Posted 03-17-2022 08:10
    No replies, thread closed.
    Morning Charles,  have you looked into using the integration configuration to resolve this?
    If I'm following you that's what the integration is for.  It should be executed before the data action to refresh any new bearer tokens or credentials.

    ------------------------------
    Chris Martin
    CCS Medical
    ------------------------------



  • 3.  RE: Automate API Key update for data actions

    Posted 03-17-2022 08:28
    No replies, thread closed.
    Not exactly....the integration has to be setup to use a data action.....I think you are referring to Oauth 2.0, where it uses the API key to generate the token to use in subsequent API calls until it expires (like every 24 hours etc)....I'm referring to updating the actual API key itself on a regular basis. I believe that is hardcoded in the data action itself, and used in the header of the call, and doesn't have a default expiration. But most of our clients want to update it at least yearly, and I'm not sure if Genesys Cloud even has a way to automate that - I'm thinking it would have to be a separate function that runs outside of Genesys Cloud that calls a Genesys API to update a particular data action, but I don't think that API exists....

    ------------------------------
    Charles Skowron
    ------------------------------



  • 4.  RE: Automate API Key update for data actions

    Posted 04-20-2022 15:00
    No replies, thread closed.
    Charles,

    This isn't exactly what you are asking for, but....

    If you use the Integration setup using "user defined" you can specify a name value pair like apikey:12345.  In the data action in the header you put the actual key name in the name field and "${credentials.apikey}" in the value field.

    If you do that on each of your actions you only have to update the credential in the integration not each of the actions.

    Matt

    ------------------------------
    Matt Goff
    Individual Only Contact Account
    ------------------------------



  • 5.  RE: Automate API Key update for data actions

    Posted 04-20-2022 16:10
    No replies, thread closed.
    Thanks - we are using that for most our integrations to simplify the update, but it is still a manual process....

    ------------------------------
    Charles Skowron
    ------------------------------



  • 6.  RE: Automate API Key update for data actions

    Posted 04-21-2022 11:54
    No replies, thread closed.
    Charles,

    I would suggest that you make the API Key one of the inputs of the input contract.  The in the Data Action configuration of the header you can use something like ${input.APIKey} for the header value.

    The Architect flow designer will have either put the actual APIKey into the input for the data action, or better yet they can define a global flow variable that contains the API Key and then use that variable as the value for the API Key input.  When they need to update the API Key, they just have to change the default value of the global value and it will automatically be updated everywhere in the flow that they call the data action.

    I know that is not automated, but it's far easier than having to republish data actions where the API Key is hard coded.

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