login-endpoint
Login method to get user JWT token data
Login method used to authenticate user and get JWT token data.
Value of the response token field can be used as X-Authorization header value:
X-Authorization: Bearer $JWT_TOKEN_VALUE.
post/api/auth/login
Request body
Example request
{
"username": "tenant@thingsboard.org",
"password": "tenant"
}Response
OK
Example response
{
"token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi...",
"refreshToken": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi..."
}