Reference
set_session_value
Store a short-lived key/value inside the current WebSocket session.
set_session_value
Store a value in the session-scoped key/value store. Values live only for this WebSocket connection.
- Type:
14 - Requires initialization: yes
- Requires authorization: no
Request and response example
set_session_value
Store a short-lived key/value in the current WebSocket session.
Request fields
| Field | Type | Required | Meaning |
|---|---|---|---|
key | string | yes | Session key. |
value | string | yes | Session value. |
ttl | int64 | null | yes | TTL in seconds. If 0 or null, the server uses a default TTL (currently 72 hours). |
Common statuses
| Status | Meaning |
|---|---|
1 | ok |
504 | session_key_too_long |
507 | session_value_too_long |
6 | internal_server_error |