Logging in using a JWT
2 min
Use a JSON Web Token (JWT) to log into a tenant through Open ID Connect (OIDC) authorization.
Base URL:
https://{tenant url}/api/rest/authentication/login
Generating a JWT
Generate a JWT to log in to a tenant using OIDC authorization. A JWT does not contain a tenant URL while a session ID does.
URL | https://{tenant url}/api/rest/authentication/login |
|---|---|
Method | POST |
Request Payload | {
"tenant" :"{tenant url}",
"username" :"{name of the user}",
"password" :"{password set for the user}",
"role" :"{user role to log-in to the application}"
} |
Status Code | 200 |
When providing the "role" parameter, you need to provide the internal name of the role and not the display name. For example, Admin is the internal name of the role Administrator.
If the log-in API is executed successfully, the application generates a JWT. Follow the below steps to execute an endpoint:
- Create a new request in the Postman application.
- Enter the following information in the Authorization tab:
- Set the option as Bearer Token in the Type field.
- Enter the generated JWT in the Token field.
- Enter the endpoint request payload details and select Send.
