Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.04 KB

File metadata and controls

53 lines (39 loc) · 1.04 KB
description Logs user out.

Logout User Endpoint

URL Requires Auth HTTP Method
api/v1/users.logout YES POST

Headers

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)

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'

Result

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 %}