Logout User Endpoint
Logs user out.
URL | Requires Auth | HTTP Method |
---|---|---|
api/v1/users.logout | YES | POST |
Argument | Example | Required | Description |
---|---|---|---|
X-User-Id | myuser-name | Required | Your username hash (returned after you log in through the API) |
X-Auth-Token | myauth-token | Required | Your token (returned after you log in through the API) |
curl --location --request POST 'http://localhost:3000/api/v1/users.logout\
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'
{
"message": "User JxemcN9PDCdfzJeZr has been logged out!",
"success": true
}
The following error can occur upon the endpoint.
- Authorization: Requires an authentication token for the request to be made.
Authorization
{
"success": false,
"error": "unauthorized"
}
Last modified 1yr ago