Login
POST
/auth/login
const url = 'https://example.com/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ client_id: 'example', client_secret: 'example', grant_type: 'example', password: 'example', scope: '', username: 'example' })};
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://example.com/auth/login \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data client_id=example \ --data client_secret=example \ --data grant_type=example \ --data password=example \ --data scope= \ --data username=exampleAuthenticate with username and password, receive a JWT token.
Request Body required
Section titled “Request Body required ” Media type application/x-www-form-urlencoded
Responses
Section titled “ Responses ”Successful Response
Media type application/json
TokenResponse
object
access_token
required
Access Token
JWT access token for Authorization header
string
expires_in
required
Expires In
Seconds until the access token expires
integer
refresh_token
required
Refresh Token
Opaque token used to obtain a new access token
string
token_type
Token Type
string
Example
{ "token_type": "bearer"}Bad request — invalid query parameters or payload
Media type application/problem+json
Unauthorized — missing or invalid credentials
Media type application/problem+json
Forbidden — caller lacks access to this resource
Media type application/problem+json
Not found
Media type application/problem+json
Validation error
Media type application/problem+json
Too many requests — retry after the advertised interval
Media type application/problem+json
Headers
Section titled “Headers ” Retry-After
integer
Seconds until the request may be retried
Internal server error
Media type application/problem+json
Service unavailable — the database could not serve the request
Media type application/problem+json