This endpoint is used to revoke a given access token, in other words, revoke access of a given user to API endpoints.
Method | URI | Headers |
---|---|---|
POST | /api/logout | Authorization: Bearer <token> Accept: application/json |
Example request
curl \
--request POST \
--url https://api.luxstay.com/api/logout \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example response
{
"message": "Logged out successfully."
}
Reason invalid access token
Example response
{
"message": "Unauthenticated."
}