Create a Logout URL for Browsers
GEThttps://apis.<domain>/auth/self-service/logout/browser
This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.
This endpoint is NOT INTENDED for API clients and only works
with browsers (Chrome, Firefox, ...). For API clients you can
call the /logout/api
URL directly with the Session Token.
The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error.
When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
Request
Query Parameters
Return to URL
The URL to which the browser should be redirected to after the logout has been performed.
Header Parameters
HTTP Cookies
If you call this endpoint from a backend, please include the original Cookie header in the request.
Responses
- 200
- 400
- 401
- 500
logoutFlow
- application/json
- Schema
- Example (from schema)
Schema
LogoutToken can be used to perform logout using AJAX.
LogoutURL can be opened in a browser to sign the user out.
format: uri
{
"logout_token": "string",
"logout_url": "string"
}
errorGeneric
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
errorGeneric
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
errorGeneric
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'https://apis.<domain>/auth/self-service/logout/browser' \
-H 'Accept: application/json'