Company Token

A Company Token provides company-wide access to Factorial data. All actions are performed on behalf of the company, not a specific user.

Create the OAuth Application

Register a new OAuth application in Factorial as an admin.

  1. Log in to Factorial with your admin account and navigate to the OAuth applications page:
  2. Click the "New Application" button to create a new application.

Configure Application Settings

Fill in the application details with the Redirect URI and scopes.

  1. Enter the Application Name (for example, the name of the software you're integrating).

  2. Enter the Redirect URI:

    • Postman in browser: https://oauth.pstmn.io/v1/browser-callback
    • Postman desktop: https://oauth.pstmn.io/v1/callback
  3. Select the scopes you will need for your integration.

    If you have doubts about which scopes to apply, you can contact Factorial support.

  4. Click "Submit".


Save Client ID and Client Secret

Copy the credentials — the Client Secret is only shown once.

  1. Copy and save the Client Secret in a safe location — it cannot be regenerated if lost.
  2. The Client ID will always be accessible from the application settings.
  3. Verify the Redirect URI and Scopes are saved correctly.
⚠️

Important: The Client Secret is shown only once. Store it securely immediately.


Generate Authorization Code

The Authorization Code will be needed in the next step.

  1. Click the green "Authorize" button next to the Company Token.
  1. You will be redirected to a Factorial page where you need to authorize the application to access data for the applied scopes.
  1. After clicking the "Authorize" button, you will be redirected to your Redirect URI page.
  1. The URL of that page contains your Authorization Code. For example:
https://oauth.pstmn.io/v1/browser-callback?code=elX2bzbV85mS90PU8319-mqxLcl-1MgSmuQlas33gw

In this example, the code is: elX2bzbV85mS90PU8319-mqxLcl-1MgSmuQlas33gw


Exchange Code for Access Token

Use Postman to request the token.

  1. In Postman, go to My Collection → Get data → Authorization.
  2. Set the Auth Type to OAuth 2.0.
  1. Fill in the Configure New Token section with the following values:
FieldProductionDemo
Auth URLhttps://api.factorialhr.com/oauth/authorizehttps://api.eu2.demo.factorial.dev/oauth/authorize
Access Token URLhttps://api.factorialhr.com/oauth/tokenhttps://api.eu2.demo.factorial.dev/oauth/token
Client IDYour Client ID from the applicationYour Client ID from the application
Client SecretYour Client Secret from the applicationYour Client Secret from the application


  1. Scroll down to Auth Request and add a query parameter:
    • Key: code
    • Value: Your Authorization Code from step A4
  1. Click the orange "Get new access token" button.
  1. In the pop-up window, click "Authorize" again.
  1. After authorization, a pop-up in Postman will return your Access Token.

Success! You now have a Company Token. This token does not expire but can be revoked if needed.



Did this page help you?