User Token
A User Token provides user-scoped access. All actions are performed on behalf of a specific employee, and access is limited by that employee's permission group.
Create a Permission Group
Restrict the employee's access to only what the integration needs.
Go to Settings → Permissions → New Custom Group and select the permissions the integration should be limited to. This ensures the integration can only see and modify data you explicitly allow.
Create a Dedicated Employee or External User Account
Set up an employee account that will own the user token.
- Create a new employee in Factorial with a descriptive name (e.g.,
Integration User - Provider Name). Use a real email address you have access to, as Factorial will send an activation email. - If you outsource integration management to an external provider, you can invite them as an External User in your company settings.
Activate the Employee Account
The employee receives an activation email and sets their password.
Check the email inbox for the activation message. Click the link and set a password for the new account.
Create the OAuth Application (if not done already)
Register a new OAuth application in Factorial as an admin.
- Log in to Factorial with your admin account and navigate to the OAuth applications page:
- Click the "New Application" button to create a new application.
Configure Application Settings
Fill in the application details with the Redirect URI and scopes.
-
Enter the Application Name (for example, the name of the software you're integrating).
-
Enter the Redirect URI:
- Postman in browser:
https://oauth.pstmn.io/v1/browser-callback - Postman desktop:
https://oauth.pstmn.io/v1/callback
- Postman in browser:
-
Select the scopes you will need for your integration.
If you have doubts about which scopes to apply, you can contact Factorial support.
-
Click "Submit".
Save Client ID and Client Secret
Copy the credentials — the Client Secret is only shown once.
- Copy and save the Client Secret in a safe location — it cannot be regenerated if lost.
- The Client ID will always be accessible from the application settings.
- Verify the Redirect URI and Scopes are saved correctly.

Generate Authorization Code (User Token)
Log in as the integration employee or external user and authorize the application.
Important: Since only admins can access the OAuth applications panel, the admin must build the authorization URL and share it with the integration employee or external user. That user opens the link while logged into Factorial.
-
Build a URL to share with the user as follows:
https://api.factorialhr.com/oauth/authorize?client_id=<YOUR_CLIENT_ID>&redirect_uri=<YOUR_REDIRECT_URI>&response_type=codeWhere:
YOUR_CLIENT_ID= Client ID of your applicationYOUR_REDIRECT_URI= Redirect URI set when creating your application
-
Alternatively, right-click the green "Authorize" button and select Copy Link Address.
Once the user accesses the URL, the Authorization Code will be attached at the end of the redirect URL. For example:
https://oauth.pstmn.io/v1/browser-callback?code=elX2bzbV85mS90PU8319-mqxLcl-1MgSmuQlas33gw
Exchange Code for Access Token
Use Postman to exchange the authorization code for an access token.
- In Postman, go to My Collection → Get data → Authorization.
- Set the Auth Type to
OAuth 2.0.
- Fill in the Configure New Token section with the following values:
| Field | Production | Demo |
|---|---|---|
| Auth URL | https://api.factorialhr.com/oauth/authorize | https://api.eu2.demo.factorial.dev/oauth/authorize |
| Access Token URL | https://api.factorialhr.com/oauth/token | https://api.eu2.demo.factorial.dev/oauth/token |
| Client ID | Your Client ID from the application | Your Client ID from the application |
| Client Secret | Your Client Secret from the application | Your Client Secret from the application |
- Scroll down to Auth Request and add a query parameter:
- Key:
code - Value: Your Authorization Code from step A4
- Key:
- Click the orange "Get new access token" button.
- In the pop-up window, click "Authorize" again.

- After authorization, a pop-up in Postman will return your Access Token.
User Token Expiry: User tokens expire after 1 hour. Save therefresh_tokento request new access tokens without re-authorizing.
Refreshing Access Token
User access tokens are valid for a period of one hour. After this period has expired, you will need to request a new access token with a POST request, providing the refresh token that came with the first access token.
NoteNon-admin users can perform this action as long as they have the refresh token provided at time of first authentication.
ImportantThe refresh access token will last 1 week. In case you are over one week, you will need to start the process all over again.
curl -X POST 'https://api.factorialhr.com/oauth/token' -d 'client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>&refresh_token=<REFRESH_TOKEN>&grant_type=refresh_token'Revoking Access Token
You can revoke an access/refresh token if you do not want it to remain active. This can be necessary in cases where you feel a token has been compromised.
NoteUsing a new token automatically revokes the previous token, and hence an API call is not necessary for that.
curl -X POST 'https://api.factorialhr.com/oauth/revoke' -d 'client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>&token=<TOKEN>'
YOUR_CLIENT_ID: OAuth2 Application Id
YOUR_CLIENT_SECRET: OAuth2 Application Secret
TOKEN: OAuth2 Access/Refresh Token (whichever you wish to revoke)Updated 20 days ago

