How Can I Set Up Automatic "Refreshing" of a OAuth Client Credential Tokens
Hey,
I currently have an established OAuth Provider and have been able to successfully request a Client Credential Token. How can I automatically "refresh" this Token within Decisions?
Comments
-
Hey there,
I would be glad to help you out here.
Given you have configured an OAuth Provider and successfully requested an OAuth Client Credentials Token, you should be able to configure a Scheduled Job to prevent the Client Credential OAuth Token from expiring. To do this, we first need to create a Flow containing the ResetClientCredentialsToken Step found in the Designer Toolbox under Integration -> Internal Services -> OAuthTokenService.
You can configure this Step to use the same values as what was input for the first successfully requested Token. For any fields you do not need, you can set these inputs to NULL. As a note, you can obtain the Token ID of the first successfully requested Token by right-clicking the respective Token in System > Integrations > OAuth and copying the returned token id under Manage > Get OAuth Token ID.
Debug this Flow to confirm that the Step is successful. If so, the next step would be to configure the Scheduled Job to utilize this Flow on a 20-30 minute interval schedule. To do so, navigate to System -> Jobs and Events -> Scheduled Jobs. Create a "New Scheduled Flow" and configure the Scheduled Flow as follows to Reset the Token every 30 minutes.
Upon doing so, the Scheduled Job should run immediately and continue to run every 30 minutes resetting the Token on each run. A similar example and other examples using different types of Tokens can be found in the below documentation for reference.
Creating OAuth Tokens: Creating OAuth Tokens - OAuth
Hope this helps!
-Cody
Howdy, Stranger!
Categories
- 4.2K All Categories
- 66 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions