Authentication
This page will help you get started with the Officient API.
Warning
It is highly recommended that you use a sandbox account during development to ensure the safety of your production data.
You can create a sandbox at https://companysandbox.officient.io/signup, replacing 'company' with your organisation's name.
To start making API requests, you need an access token for the account in question.
Getting an access token
Getting an access token for your own account
Use case
You want to integrate with your own Officient account. For example, get employee information from Officient to add to an internal tool.
Steps
- Log in to Officient as admin, click the top right-hand menu (your avatar), then click developers.
- Create a new client app if none exists
- Generate a temporary access token using the interface
- Use the access token in your requests
Getting an access token for a 3rd party account via Oauth2
Use case
You want to integrate your own software with Officient and provide this integration as a service to your customers. For example, you want to send time-tracking information of your customers to Officient.
Steps
- Log in to Officient as admin, click the top right-hand menu (your avatar), then click developers.
- Create a new client app if none exists
- Enter the oauth callback url for your app
- Redirect your users to https://app.officient.io/authorize?client_id={client_id}&state=xyz
- use https://api.officient.io/1.0/token to exchange the authorization code for an access token and a refresh token. More information about this API call here: https://apidocs.officient.io/v1.0/reference
- Your app can now be used to connect to your own account. To be able to connect to 3rd party account, your app needs to be verified. Contact us via chat or [email protected].
Using access tokens in a request
To authorize any API request, add the 'Authorization' header field.
It should contain the text 'Bearer <access_token>'
This token header should be present in every request you make after authenticating.
Refresh access tokens using a refresh key
The /api/token endpoint can also be used to gain a new access key using your refresh key.
Refresh tokens are long-lived and can be reused.
More information about this API call here: https://apidocs.officient.io/v1.0/reference
Updated over 1 year ago