Packets
Logout
Ends the current authorization context for the initialized session.
Logout removes current authorization from the session.
This operation is available only after successful Initialize.
Request
Logout uses packet type = 5.
{
"type": 5,
"id": 6
}Prop
Type
Response
{
"id": 6,
"status": 1
}Prop
Type
Behavior notes
- On success, session authorization is cleared.
- After logout, protected operations require a new authorization.
Logout statuses
| Status | Constant | Returned when |
|---|---|---|
1 | Ok | Logout completed successfully. |
3 | NotAuthorized | Session is not authorized, so there is nothing to logout from. |
Connection-close cases (before/around this usecase)
Logout itself returns JSON responses with status, but session can still be closed by protocol/session guards:
| Close code | Error | When it happens |
|---|---|---|
4200 | connection is not initialized | Request was sent before successful Initialize. |
4201 | rate limit hit | Global per-session packet rate limit was exceeded. |
4302 | invalid request body | Packet body does not match the required schema for this operation. |