agilio | 2021-03-03 18:45:03 UTC | #1
How long is a Auth Token good for before Genesys Goes and grabs a new token from the custom Auth when using Data Actions?
agilio | 2021-03-03 18:42:44 UTC | #2
Why and when does Genesys go back to get a new Auth Token?
ChrisDibble | 2021-03-03 20:45:54 UTC | #3
Hi Agilio,
As a general rule, the token will continue to be used until an auth failure occurs. At that point, the data action will re-authenticate and try again. The retry happens automatically and is transparent to whatever invoked the data action. Let is know if you have any other questions.
-Chris
agilio | 2021-03-03 21:11:31 UTC | #4
Why would a failure occur? Would an expiration returned with the token provide a more repeatable way?
Jason_Mathison | 2021-03-04 15:20:34 UTC | #5
Hi agilio,
By far the most common cause of a failure is having a 401 returned because the auth token expired. We will then get a new token and retry the original request. For most cases this only adds a few extra tenths of a second for the Data Action to finish.
Our token could also expire for other reasons. For example, if the same credentials were used to create additional tokens, there may be a token limit that would eventually cause our token to be "bumped". The expiration date in theory gives a hard limit for when the token will expire, but it does not guarantee that it will live that long.
We could potentially check the token expiration before attempting to use it, but from a simplicity and reliability standpoint our current approach has worked pretty well. Are you seeing a problem with our approach in the field?
--Jason
agilio | 2021-03-04 15:40:03 UTC | #6
Thanks Jason. One more follow up. If Multiple Data Actions use the same Custom Auth Action do they share that Token across all of them?
Jason_Mathison | 2021-03-04 15:52:44 UTC | #7
All of the actions for a given integration use the same auth token.
agilio | 2021-03-04 16:22:31 UTC | #8
Thank you much appreciated
system | 2021-04-04 16:22:35 UTC | #9
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 10162