Skip to content
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
39 lines (29 loc) · 896 Bytes

File metadata and controls

39 lines (29 loc) · 896 Bytes

Logout User

HTTP MethodURLRequires Auth
POSTapi/v1/users.logoutyes

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.

{% tabs %} {% tab title=" Authorization" %}

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

{% endtab %} {% endtabs %}