---
title: "Login with Username and Password"
slug: "login-with-username-and-password"
updated: 2026-10-29T14:38:08Z
published: 2026-10-29T14:38:08Z
canonical: "developer.rocket.chat/login-with-username-and-password"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Login with Username and Password
Post/api/v1/login
- Although none of the body parameters are required, it's mandatory to include either the `user` AND `password` or only the `resume` parameter.
- To authenticate a request, you need to pass the `userId` and `authToken` values from this JSON response object as headers in the request. The `authToken` is passed as `X-Auth-Token` header, while the `userId` as `X-User-Id` header.
- If LDAP authentication is enabled, you must maintain the login in the same way as you normally do. Similarly, if 2FA is enabled for an LDAP user, everything stays the same.
### Changelog
| Version | Description |
| --- | --- |
| 1.0.0 | Added `avatarUrl` property to response |
| 0.64.0 | Added `me` property. |
| 0.60.0 | Added |
Body parametersExample
```json
{
"user": "test@rocket.test",
"password": "vanvica32"
}
```
object userstring
Your user name or email.
Examplemyusername
passwordstring
Your pasword.
Examplemy$up3erP@ssw0rd
resumestring
Your previously issued `authToken`.
Example9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq
codestring
The 2FA code. It is required if your account has two-factor authentication enabled .
Example2246d10
Responses200Login successful
```json
{
"status": "success",
"data": {
"authToken": "9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq",
"userId": "aobEdbYhXfu5hkeqG",
"me": {
"_id": "aYjNnig8BEAWeQzMh",
"name": "Rocket Cat",
"emails": [
{
"address": "rocket.cat@rocket.chat",
"verified": false
}
],
"status": "offline",
"statusConnection": "offline",
"username": "rocket.cat",
"utcOffset": -3,
"active": true,
"roles": [
"admin"
],
"settings": {
"preferences": {}
},
"avatarUrl": "http://localhost:3000/avatar/test"
}
}
}
```
Expand Allobject statusstring
dataobject authTokenstring
userIdstring
meobject _idstring
namestring
emails Array of object object addressstring
verifiedboolean
statusstring
statusConnectionstring
usernamestring
utcOffsetinteger
activeboolean
roles Array of string string
settingsobject preferencesobject
avatarUrlstring