Machine to Machine Tokens
Authentication API endpoints#
Request a new API Token#
POST https://auth.levity.ai/identity/resources/auth/v1/api-token#
The POST /identity/resources/users/api-tokens/v1 endpoint can accept a request with the following json properties in the body payload:
- clientId: Input parameter
- secret: Input parameter
Response will contain the following
{ "expires": "<expiry timestamp>", "expiresIn": <seconds until expiry>, "accessToken": "eyJhbGciOi...", "refreshToken": "<refresh token identifier>"}Refresh Access Token#
POST https://auth.levity.ai/identity/resources/auth/v1/api-token/token/refresh#
The POST /identity/resources/auth/v1/api-token/token/refresh endpoint can accept a token request with the following url parameters:
Body Parameters#
- refreshToken: The refresh token identifier generated in the API Token response.
Response will contain:
{ "expires": "<expiry timestamp>", "expiresIn": <seconds until expiry>, "accessToken": "eyJhbGciOi...", "refreshToken": "<new refresh token identifier>"}