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, content is omitted.

Get-variable statuses

StatusConstantReturned when
1OkVariable content returned successfully.
3NotAuthorizedVariable is protected and current session is not authorized.
400VariableNotFoundVariable does not exist for this application.
401VariableInvalidNamename 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 codeErrorWhen it happens
4200connection is not initializedRequest was sent before successful Initialize.
4201rate limit hitGlobal per-session packet rate limit was exceeded.
4302invalid request bodyPacket body does not match the required schema for this operation.
4304received unsupported dataClient sent unsupported frame type (request packets must be text JSON).

On this page