Obtaining Bearer Tokens for Authentication (OAuth 2.0)
Recipe: Obtaining Bearer Tokens for Authentication (OAuth 2.0)
To generate a token, follow these steps:
-
Open the Developer Console
For Pro HCM:System Configuration > Security > Developer Console
For Pro WFM:Administation > Developer Console -
Copy Developer Metadata
From the Developer Console page, copy the following:- Organization (For example:
org_c5DJ9CCKN4WUuP98) - Generate Token URL (For example:
https://welcome-staging-test.ukg.dev) - audience (For example:
api.ukg.net)
- Organization (For example:
-
Copy Integration Credentials
Next, copy the following credentials for the desired integration:- Client ID
- Client Secret
-
Gather Additional Fields
You will also need:- Grant Type (currently always
client_credentials; other options may be available in the future)
- Grant Type (currently always
-
Use the UKG OAuth Token API
With the above values in hand:- Organization
- Generate Token URL
- Client ID
- Client Secret
- Grant Type
- Audience
Call the UKG OAuth Token API and enter the required data to obtain the OAuth Bearer Token.
-
Use the OAuth Bearer Token
Once you have the token:- Navigate to the desired API
- Enter the OAuth Bearer Token into the
Authorizationheader - Enter the organization into the
global-tenant-idheader - Run the API
Updated 16 days ago