Revoke Access Token

This endpoint is used to revoke a given access token, in other words, revoke access of a given user to API endpoints.

Endpoint

Method URI Headers
POST /api/logout Authorization: Bearer <token>
Accept: application/json

Request & Response Examples

Successful Response

200

Example request

curl \
  --request POST \
  --url https://api.luxstay.com/api/logout \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
1
2
3
4
5

Example response

{
    "message": "Logged out successfully."
}
1
2
3

Error Response

401

Reason invalid access token

Example response

{
    "message": "Unauthenticated."
}
1
2
3
Last Updated: 11/18/2018, 9:11:26 AM