Scenario:
We have created an Integration that uses User Defined (OAuth) credential type (How to use the User Defined (OAuth) credential type - Genesys Cloud Resource Center). Here we specify the loginUrl and the client credentials. Now in our scenario, we have different endpoints for the loginUrl for prod and non-prod instance. Is there a way by which this loginUrl can be made dynamic ? Else we will have to create 2 different integrations one for non-prod another for prod.
Also, we would like to understand the following for User Defined (OAuth) credential type :
- The access token generated once, is it reused in subsequent API calls even though the API calls belong to different call/interaction sessions ? i.e. is this cached till the current token expires ?
- The crednetials (url, clientid and secret and the accesstoken generated are redacted in the test window, does the sane hold good for the logs that get captured on Genesys cloud end when the architect flow executes ? Or the clietn id/secret gets printed in the logs when the data action is invoked?
Alternative approach :
For the scenario mentioned above, another approach could be to create two separate data actions, one for generating access token and other for the actual api call that will use the token generated. Next in the architect flow, first invoke the data action to generate the token, extract the token from the response, then invoke the second data action and supply the token generated as bearer auth header. Using this approach we can supply the loginUrl as a parameter to the first data action and we need not create 2 sets of data action every time. Below are my questions related to this alternative approach
- Is there a way to still redact hide/redact the data consumed and response generated in the first data action invocation (for access token) in the logs ?
- Can the access token generated using the alternative approach still be cached ? If no, is there a way to implement this caching easily within Genesys cloud ?
Kindly suggest the best approach.
Regards,
Gopi