Machine to Machine Tokens
#
Authentication API endpoints#
Request a new API Tokenhttps://auth.levity.ai/identity/resources/auth/v1/api-token#
POSTThe 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 Tokenhttps://auth.levity.ai/identity/resources/auth/v1/api-token/token/refresh#
POSTThe 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>"}