Login
Log in a user.
Rocket.Chat supports various methods of authentication. The list of supported auth services (and their configurations) are in the meteor_accounts_loginServiceConfiguration
collection.
Using username and password
To ensure the security of the user's account, it is important not to submit the user's password as plain text. Instead, apply a hashing algorithm (for example - sha-256).
The digest must be lowercase.
Payload Parameters
Argument | Example | Required | Description |
---|---|---|---|
| |||
Required | The user object containing either the username or email. | ||
| Required | The password object containing the hashed password and the hash algorithm |
Example Payload
Example Call
Example Response
Success
Error
Using an authentication token
You can use a previous user authentication token or a Personal Access Token to log in a user.
Payload Parameters
Argument | Example | Required | Description |
---|---|---|---|
|
| Required | A personal access token or previous authToken of the user. |
Example Call
Example Response
This success response format remains the same irrespective of the login method used.
If the auth-token
is expired, send another login request to get a new authToken
with a new expiration date.
Using Authentication providers
OAuth is used to support additional auth providers.
Example Call
Last updated