End OAuth session
Redirects the user to a page where they can log out and revoke the oauth tokens - for a detailed description of input parameters please see the user initiated logout spec
POST
/{apiBasePath}/oauth/end_sessionPath parameters
apiBasePathstringrequiredIts value depends on the apiBasePath set by the user
Request body
application/jsonid_token_hintstringclient_idstringpost_logout_redirect_uristringResponses
200A general error response
statusstringError status code
Allowed:
GENERAL_ERRORmessagestringError message
302Redirects the user to the logout page or back to the client app
400OAuth2 specific error response
errorstringThe OAuth2 error code
error_descriptionstringHuman readable error description
404Resource not found error
string500Internal server error
stringTry it
Server
Parameters
Bodyapplication/json
Request
curl -X POST "/auth/oauth/end_session" \
-H "Content-Type: application/json" \
-d '{
"id_token_hint": "string",
"client_id": "st-cl-example-client",
"post_logout_redirect_uri": "https://client.example.com/logoutCallback"
}'const response = await fetch("/auth/oauth/end_session", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"id_token_hint": "string",
"client_id": "st-cl-example-client",
"post_logout_redirect_uri": "https://client.example.com/logoutCallback"
})
});import requests
response = requests.post(
"/auth/oauth/end_session",
headers={
"Content-Type": "application/json"
},
json={
"id_token_hint": "string",
"client_id": "st-cl-example-client",
"post_logout_redirect_uri": "https://client.example.com/logoutCallback"
},
)Response
{
"status": "GENERAL_ERROR",
"message": "string"
}Redirects the user to the logout page or back to the client app
{
"error": "invalid_request",
"error_description": "Unsupported grant type: password"
}"Not Found""Internal Error"