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
- Base URLhttps://demo.thingsboard.io
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"username": "tenant@thingsboard.org",
"password": "tenant"
}Response
OK
Example response
{
"token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi...",
"refreshToken": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi..."
}Changes
No recorded changes to this operation across all 2 revisions of this API.