📄Logout

Logout Flow for the Matar App


Logout from the App

Params

Header Parameter ⬇️

Header ParameterData TypeDescription

Bearer {{access_token}} (required)

String

Access tokens enable secure login and logout.


Sample Request ⬇️️ (Header Parameter)

curl --location --request POST 'https://matar.in.ngrok.io/api/v1/logout' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ'

Responses ⬇️

Status Code: 🟢200 (200 denotes 'ok')

{
    "message": "Successfully logged out"
}

When Token is Revoked.

Params

Header Parameter ⬇️

Header ParameterData TypeDescription

Bearer {{access_token}} (required)

String

Access tokens enable secure login and logout.


Sample Request ⬇️️ (Header Parameter)

When a token is already revoked: Removal of the client permissions associated with the specified token for accessing the protected Matar resources.
curl --location --request POST 'https://matar.app/api/v1/logout' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ'

Responses ⬇️

Status Code: 🔴401 (401 denotes 'Unauthorized')

{
    "description": "The token has been revoked.",
    "error": "token_revoked"
}

Last updated