Logout User

HTTP MethodURLRequires Auth

POST

api/v1/users.logout

Example Call

curl --location --request POST http://localhost:3000/api/v1/users.logout \
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

Example Response

Success

{
    "message": "User JxemcN9PDCdfzJeZr has been logged out!",
    "success": true
}

Errors

The following error can occur upon the endpoint.

  • Authorization: Requires an authentication token for the request to be made.

{
    "success": false,
    "error": "unauthorized"
}

Last updated

Rocket.Chat versions receive support for six months after release.