Skip to main content

Workspace Tokens

Authentication API endpoints#


Request a new API Token#

POST https://api.levity.ai/v1/workspace-token/#

The POST /v1/workspace-token/ 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://api.levity.ai/v1/workspace-token/refresh/#

The POST v1/api-token/token/refreshendpoint 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>"}