Skip to main content

Revoke sessions

DELETE /auth/session/{option}
devhttps://api.sandbox.ovok.com

The Delete Session API endpoint revokes session(s) from the Ovok platform. The access and refresh tokens for the sessions(s) will be invalidated. You can specify if you'd like to revoke all, current, other or a specific session by providing the session ID.

Example cURL request

curl -X DELETE \
--url 'https://api.dev.ovok.com/auth/session/other' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'

Parameters

NameInTypeRequiredDescription
optionpathyesWhich sessions to revoke. Use current to revoke the calling session, other to revoke every session except the calling one, all to revoke every session, or a specific session UUID to revoke just that session.

Responses

CodeDescription
200Success.
400The request could not be operated by the server.
401The resource owner or authorization server denied the request.
404The requested resource could not be found.
422The request could not be validated by the server.
500The server encountered an unexpected condition. Please try again later.

200SessionsResponseDto (application/json)

  • sessions: object[] (required)
    • id: string (required)
    • lastUpdated: string (required)
    • authMethod: string (required)
    • remoteAddress: string (required)
    • browser: string (required)
    • os: string (required)

Example

{
"sessions": [
{
"id": "4e5a2893-bdcc-7d23-9c1d-b72e4c4ffbe4",
"lastUpdated": {},
"authMethod": "password",
"remoteAddress": "192.168.1.1",
"browser": "Chrome",
"os": "Mac OS"
}
]
}