Docs / Close Session
Close Session
Close Session
DELETE/v1/account/session
- Auth
- cookie session + X-Requested-With: cabinhub-console
- Cache-Control
no-store- Source of truth
clients/openapi.jsonanddocs/API.md§12
204with no body. Revocation is the authority: the row is marked revoked, so a saved cookie value is refused afterwards.401 {"detail":"not_signed_in"}when the request carries no live session to revoke.400for the missing console header.
Description: docs/API.md §12
Parameters
| Name | In | Required | Type | Example | Notes |
|---|---|---|---|---|---|
X-Requested-With | header | no | string |
Example request
curl -sS -X DELETE \
'https://vg.tempproject.online/v1/account/session' \
-H "Cookie: cbn_session=$NEWS_SESSION" \
-H "X-Requested-With: cabinhub-console"import json
import os
import urllib.request
URL = "https://vg.tempproject.online/v1/account/session"
def call() -> dict:
req = urllib.request.Request(URL, method="DELETE", headers={
"Cookie": f"cbn_session={os.environ['NEWS_SESSION']}",
"X-Requested-With": "cabinhub-console",
})
with urllib.request.urlopen(req, timeout=15) as res:
print(res.status, res.headers.get("Location"))
text = res.read().decode("utf-8")
return json.loads(text) if text else {}
if __name__ == "__main__":
print(call())const res = await fetch(
"https://vg.tempproject.online/v1/account/session",
{
method: "DELETE",
headers: {
cookie: `cbn_session=${process.env.NEWS_SESSION}`,
"x-requested-with": "cabinhub-console",
},
},
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(res.headers.get("etag"), await res.json());The requests are generated from the path template and the parameters in clients/openapi.json, so a new parameter appears here without an edit to this site.
Example response
HTTP/1.1 204 No Content
cache-control: no-store
set-cookie: cbn_session=; Max-Age=0; Path=/v1/account; HttpOnly; Secure; SameSite=LaxResponse example in docs/API.md §12 (DELETE /v1/account/session)
Failures
This operation can answer 204, 400, 401, 422, 429. The full envelope for each status, with its body, is on Errors.