Login
POST
/auth/login
const url = 'https://example.com/api/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ grant_type: 'example', username: 'example', password: 'example', scope: '', client_id: 'example', client_secret: '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/api/auth/login \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=example \ --data username=example \ --data password=example \ --data scope= \ --data client_id=example \ --data client_secret=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
refresh_token
required
Refresh Token
Opaque token used to obtain a new access token
string
token_type
Token Type
string
expires_in
required
Expires In
Seconds until the access token expires
integer
Example
{ "token_type": "bearer"}Bad request — invalid query parameters or payload
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Unauthorized — missing or invalid credentials
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Forbidden — caller lacks access to this resource
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Not found
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Validation error
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Internal server error
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}