Packets
Get variable
Returns application variable content by name.
Get variable reads an application variable by its name.
This operation is available only after successful Initialize.
Request
Get variable uses packet type = 11.
{
"type": 11,
"id": 12,
"name": "launcher_config"
}Prop
Type
Response
{
"id": 12,
"content": "{\"featureFlag\":true}",
"status": 1
}Prop
Type
Behavior notes
- Request and response are regular text JSON websocket frames.
- Variable access depends on its configured access strategy.
- Public variables can be read by any initialized session.
- Protected variables require an authorized session; otherwise server returns
NotAuthorized. - On non-OK statuses,
contentis omitted.
Get-variable statuses
| Status | Constant | Returned when |
|---|---|---|
1 | Ok | Variable content returned successfully. |
3 | NotAuthorized | Variable is protected and current session is not authorized. |
400 | VariableNotFound | Variable does not exist for this application. |
401 | VariableInvalidName | name is shorter than 3 characters. |
Connection-close cases (before/around this usecase)
Get variable itself returns regular JSON responses, 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. |
4304 | received unsupported data | Client sent unsupported frame type (request packets must be text JSON). |