Exchange a client ID and secret for an access token
const url = 'https://api-omni.linra.net/api/v1/auth/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"clientId":"live_9f8c2a1b4e6d4a7c9b0e3f2d1c8a5b6e","clientSecret":"••••••••••••••••••••••••••••••••••••••••••••••"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-omni.linra.net/api/v1/auth/token \ --header 'Content-Type: application/json' \ --data '{ "clientId": "live_9f8c2a1b4e6d4a7c9b0e3f2d1c8a5b6e", "clientSecret": "••••••••••••••••••••••••••••••••••••••••••••••" }'The credential-exchange door. Anonymous — no bearer token is required (you don’t have one
yet). Rate-limited independently of every other route (see the Rate limits guide).
Returns a JWT (audience partner-api) valid for 5 minutes; see the Authentication guide
for the recommended caching pattern.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Optional — delegate the issued token’s identity to a descendant partner (materialized-path-checked). Rare; most integrations omit this.
Example
{ "clientId": "live_9f8c2a1b4e6d4a7c9b0e3f2d1c8a5b6e", "clientSecret": "••••••••••••••••••••••••••••••••••••••••••••••"}Responses
Section titled “Responses”A new access token.
object
object
object
Seconds until expiry — always 300 (5 minutes) today.
Example
{ "state": "SUCCESS", "payload": { "tokenType": "Bearer", "expiresIn": 300 }}Invalid client ID/secret, or an inactive partner.
The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).
object
Always null on an error response.
object
object
Examples
{ "state": "UNAUTHORIZED_INVALID_CREDENTIALS", "payload": null, "details": {}}{ "state": "UNAUTHORIZED_PARTNER_INACTIVE", "payload": null, "details": {}}Delegation (onBehalfOf) target is invalid or not a descendant of the caller.
The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).
object
Always null on an error response.
object
object
Examples
{ "state": "FORBIDDEN_NOT_YOUR_DESCENDANT", "payload": null, "details": {}}{ "state": "FORBIDDEN_DELEGATION_TARGET_INVALID", "payload": null, "details": {}}Too many requests — see the Rate limits guide. Retry after the Retry-After header (seconds).
The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).
object
Always null on an error response.
object
object
Example
{ "state": "NOT_FOUND_ORDER", "payload": null}Headers
Section titled “Headers”Seconds to wait before retrying.