Request authorization
Send the access token in the Authorization header:
Authorization: Bearer {{Access Token}}
Obtain a token using one of the grant types below.

The callback URL is the registered URL where the user returns after a successful login.
| Setting | Live | Developer version |
|---|---|---|
| Auth URL | https://api.lifepeaks.dk/authorize | https://api-dev.lifepeaks.dk/authorize |
| Access Token URL | https://api.lifepeaks.dk/token | https://api-dev.lifepeaks.dk/token |
The state parameter is required. Generate an unpredictable value for each authorization request and verify it when the user returns to your callback URL.
Grant types
Three grant types are enabled. There is no client_credentials grant.
grant_type | Additional fields | Used for |
|---|---|---|
password | username, password | Server-to-server integrations. See Authorization via curl. |
authorization_code | code, redirect_uri | Browser flows that send the user through /authorize. |
refresh_token | refresh_token | Exchanging a refresh token for a new access token. A new refresh token is issued every time. |
client_id and client_secret are required for all three. They can be sent in the form body, or as HTTP Basic auth.
Access tokens are valid for 86400 seconds (24 hours). Refresh tokens expire after 1209600 seconds (14 days).
Endpoints
| Endpoint | Purpose |
|---|---|
POST /token | Exchange credentials for an access token. Also reachable as POST /oauth2/token. |
POST /oauth2/revoke | Revoke an access or refresh token. Takes token and an optional token_type_hint. |
GET /authorize | Browser entry point for the authorization code flow. Redirects to /login when no session exists. |
GET /login | Login form for the authorization code flow. Posting valid credentials continues the authorize request. |
GET /logout | Ends the browser session. |
The full request and response shapes are in the v1 API reference.
Idempotency
Every response carries an X-Request-Guid header. Sending that value back as the X-Request-Guid request header on a retry replays the recorded response instead of executing the action twice. See Data.
Company credentials
A super admin can find the client ID and client secret in the company’s API settings. Register the redirect (callback) URL there before using the authorization code flow.

API users
Create a user with the API user permission. Super admins can manage these accounts in Users Admin. Use separate API users for separate integrations, such as your website, POS, or affiliate platform.
