{"_path":"/api/working-with-websockets","_draft":false,"_partial":false,"_empty":false,"title":"Working with WebSockets","description":"The WebSocket server acts like a \"real-time update data\" server, each time a presence update is triggered, you'll receive the new data from the WS server. The Lanyard WebSocket is available at wss://api.lanyard.rest/socket. If you would like to use compression, please specify ?compression=zlib_json at the end of the URL. You can read more about WebSockets for web here.","excerpt":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"working-with-websockets"},"children":[{"type":"text","value":"Working with WebSockets"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The WebSocket server acts like a \"real-time update data\" server, each time a presence update is triggered, you'll receive the new data from the WS server. The Lanyard WebSocket is available at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"wss://api.lanyard.rest/socket"}]},{"type":"text","value":". If you would like to use compression, please specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"?compression=zlib_json"}]},{"type":"text","value":" at the end of the URL. "},{"type":"element","tag":"a","props":{"href":"https://developer.mozilla.org/en-US/docs/Web/API/WebSocket","rel":["nofollow","noopener","noreferrer"],"target":"_blank"},"children":[{"type":"text","value":"You can read more about WebSockets for web here"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Once connected, you will receive "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 1: Hello"}]},{"type":"text","value":" which will contain heartbeat_interval in the data field. You should set a repeating interval for the time specified in heartbeat_interval which should send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 3: Heartbeat"}]},{"type":"text","value":" on the interval."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 2: Initialize"}]},{"type":"text","value":" immediately after receiving Opcode 1."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Example of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 2: Initialize"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"{\n op: 2,\n d: {\n // subscribe_to_ids should be an array of user IDs you want to subscribe to presences from\n // if Lanyard doesn't monitor an ID specified, it won't be included in INIT_STATE\n subscribe_to_ids: [\"162969778699501569\"]\n }\n}\n","language":"js"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"{\n op: 2,\n d: {\n // subscribe_to_ids should be an array of user IDs you want to subscribe to presences from\n // if Lanyard doesn't monitor an ID specified, it won't be included in INIT_STATE\n subscribe_to_ids: [\"162969778699501569\"]\n }\n}\n"}]}]}]},{"type":"element","tag":"h4","props":{"id":"subscribing-to-multiple-user-presences"},"children":[{"type":"text","value":"Subscribing to multiple user presences"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To subscribe to multiple presences, send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"subscribe_to_ids"}]},{"type":"text","value":" in the data object with a "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"string[]"}]},{"type":"text","value":" list of user IDs to subscribe to. Then, INIT_STATE's data object will contain a user_id->presence map. You can find examples below."}]},{"type":"element","tag":"h4","props":{"id":"subscribing-to-a-single-user-presence"},"children":[{"type":"text","value":"Subscribing to a single user presence"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you just want to subscribe to one user, you can send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"subscribe_to_id"}]},{"type":"text","value":" instead with a string of a single user ID to subscribe to. Then, the INIT_STATE's data will just contain the presence object for the user you've subscribed to instead of a user_id->presence map."}]},{"type":"element","tag":"h4","props":{"id":"subscribing-to-every-user-presence"},"children":[{"type":"text","value":"Subscribing to every user presence"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you want to subscribe to every presence being monitored by Lanyard, you can specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"subscribe_to_all"}]},{"type":"text","value":" with (bool) "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"true"}]},{"type":"text","value":" in the data object, and you will then receive a user_id->presence map with every user presence in INIT_STATE, and their respective PRESENCE_UPDATES when they happen."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Once Op 2 is sent, you should immediately receive an "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"INIT_STATE"}]},{"type":"text","value":" event payload if connected successfully. If not, you will be disconnected with an error (see below)."}]},{"type":"element","tag":"h3","props":{"id":"list-of-opcodes"},"children":[{"type":"text","value":"List of Opcodes"}]},{"type":"element","tag":"list-opcodes","props":{},"children":[]},{"type":"element","tag":"h3","props":{"id":"events"},"children":[{"type":"text","value":"Events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Events are received on "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 0: Event"}]},{"type":"text","value":" - the event type will be part of the root message object under the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"t"}]},{"type":"text","value":" key."}]},{"type":"element","tag":"h4","props":{"id":"example-event-message-objects"},"children":[{"type":"text","value":"Example Event Message Objects"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"INIT_STATE"}]}]},{"type":"element","tag":"code","props":{"code":"{\n op: 0,\n seq: 1,\n t: \"INIT_STATE\",\n d: {\n \"162969778699501569\": {\n // Full Lanyard presence (see API docs above for example)\n }\n }\n}\n","language":"js"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"{\n op: 0,\n seq: 1,\n t: \"INIT_STATE\",\n d: {\n \"162969778699501569\": {\n // Full Lanyard presence (see API docs above for example)\n }\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"PRESENCE_UPDATE"}]}]},{"type":"element","tag":"code","props":{"code":"{\n op: 0,\n seq: 2,\n t: \"PRESENCE_UPDATE\",\n d: {\n // Full Lanyard presence and an extra \"user_id\" field\n }\n}\n","language":"js"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"{\n op: 0,\n seq: 2,\n t: \"PRESENCE_UPDATE\",\n d: {\n // Full Lanyard presence and an extra \"user_id\" field\n }\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"error-codes"},"children":[{"type":"text","value":"Error Codes"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Lanyard can disconnect clients for multiple reasons, usually to do with messages being badly formatted. Please refer to your WebSocket client to see how you should handle errors - they do not get received as regular messages."}]},{"type":"element","tag":"h4","props":{"id":"types-of-errors"},"children":[{"type":"text","value":"Types of Errors"}]},{"type":"element","tag":"error-types","props":{},"children":[]}]},"head":{"meta":[{"name":"og:title","property":"og:title","content":"Working with WebSockets"},{"name":"twitter:title","property":"twitter:title","content":"Working with WebSockets"},{"name":"description","property":"description","content":"Use Lanyard with WebSockets to achieve real-time presence updates."},{"name":"og:description","property":"og:description","content":"Use Lanyard with WebSockets to achieve real-time presence updates."},{"name":"twitter:description","property":"twitter:description","content":"Use Lanyard with WebSockets to achieve real-time presence updates."}]},"body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"working-with-websockets"},"children":[{"type":"text","value":"Working with WebSockets"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The WebSocket server acts like a \"real-time update data\" server, each time a presence update is triggered, you'll receive the new data from the WS server. The Lanyard WebSocket is available at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"wss://api.lanyard.rest/socket"}]},{"type":"text","value":". If you would like to use compression, please specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"?compression=zlib_json"}]},{"type":"text","value":" at the end of the URL. "},{"type":"element","tag":"a","props":{"href":"https://developer.mozilla.org/en-US/docs/Web/API/WebSocket","rel":["nofollow","noopener","noreferrer"],"target":"_blank"},"children":[{"type":"text","value":"You can read more about WebSockets for web here"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Once connected, you will receive "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 1: Hello"}]},{"type":"text","value":" which will contain heartbeat_interval in the data field. You should set a repeating interval for the time specified in heartbeat_interval which should send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 3: Heartbeat"}]},{"type":"text","value":" on the interval."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 2: Initialize"}]},{"type":"text","value":" immediately after receiving Opcode 1."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Example of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 2: Initialize"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"{\n op: 2,\n d: {\n // subscribe_to_ids should be an array of user IDs you want to subscribe to presences from\n // if Lanyard doesn't monitor an ID specified, it won't be included in INIT_STATE\n subscribe_to_ids: [\"162969778699501569\"]\n }\n}\n","language":"js"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" op: "}]},{"type":"element","tag":"span","props":{"style":{"color":"#D19A66"}},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" d: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7F848E"}},"children":[{"type":"text","value":"// subscribe_to_ids should be an array of user IDs you want to subscribe to presences from"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7F848E"}},"children":[{"type":"text","value":"// if Lanyard doesn't monitor an ID specified, it won't be included in INIT_STATE"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" subscribe_to_ids: ["}]},{"type":"element","tag":"span","props":{"style":{"color":"#98C379"}},"children":[{"type":"text","value":"\"162969778699501569\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"subscribing-to-multiple-user-presences"},"children":[{"type":"text","value":"Subscribing to multiple user presences"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To subscribe to multiple presences, send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"subscribe_to_ids"}]},{"type":"text","value":" in the data object with a "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"string[]"}]},{"type":"text","value":" list of user IDs to subscribe to. Then, INIT_STATE's data object will contain a user_id->presence map. You can find examples below."}]},{"type":"element","tag":"h4","props":{"id":"subscribing-to-a-single-user-presence"},"children":[{"type":"text","value":"Subscribing to a single user presence"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you just want to subscribe to one user, you can send "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"subscribe_to_id"}]},{"type":"text","value":" instead with a string of a single user ID to subscribe to. Then, the INIT_STATE's data will just contain the presence object for the user you've subscribed to instead of a user_id->presence map."}]},{"type":"element","tag":"h4","props":{"id":"subscribing-to-every-user-presence"},"children":[{"type":"text","value":"Subscribing to every user presence"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you want to subscribe to every presence being monitored by Lanyard, you can specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"subscribe_to_all"}]},{"type":"text","value":" with (bool) "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"true"}]},{"type":"text","value":" in the data object, and you will then receive a user_id->presence map with every user presence in INIT_STATE, and their respective PRESENCE_UPDATES when they happen."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Once Op 2 is sent, you should immediately receive an "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"INIT_STATE"}]},{"type":"text","value":" event payload if connected successfully. If not, you will be disconnected with an error (see below)."}]},{"type":"element","tag":"h3","props":{"id":"list-of-opcodes"},"children":[{"type":"text","value":"List of Opcodes"}]},{"type":"element","tag":"list-opcodes","props":{},"children":[]},{"type":"element","tag":"h3","props":{"id":"events"},"children":[{"type":"text","value":"Events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Events are received on "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Opcode 0: Event"}]},{"type":"text","value":" - the event type will be part of the root message object under the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"t"}]},{"type":"text","value":" key."}]},{"type":"element","tag":"h4","props":{"id":"example-event-message-objects"},"children":[{"type":"text","value":"Example Event Message Objects"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"INIT_STATE"}]}]},{"type":"element","tag":"code","props":{"code":"{\n op: 0,\n seq: 1,\n t: \"INIT_STATE\",\n d: {\n \"162969778699501569\": {\n // Full Lanyard presence (see API docs above for example)\n }\n }\n}\n","language":"js"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" op: "}]},{"type":"element","tag":"span","props":{"style":{"color":"#D19A66"}},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" seq: "}]},{"type":"element","tag":"span","props":{"style":{"color":"#D19A66"}},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" t: "}]},{"type":"element","tag":"span","props":{"style":{"color":"#98C379"}},"children":[{"type":"text","value":"\"INIT_STATE\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" d: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#98C379"}},"children":[{"type":"text","value":"\"162969778699501569\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":": {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7F848E"}},"children":[{"type":"text","value":"// Full Lanyard presence (see API docs above for example)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"PRESENCE_UPDATE"}]}]},{"type":"element","tag":"code","props":{"code":"{\n op: 0,\n seq: 2,\n t: \"PRESENCE_UPDATE\",\n d: {\n // Full Lanyard presence and an extra \"user_id\" field\n }\n}\n","language":"js"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" op: "}]},{"type":"element","tag":"span","props":{"style":{"color":"#D19A66"}},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" seq: "}]},{"type":"element","tag":"span","props":{"style":{"color":"#D19A66"}},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" t: "}]},{"type":"element","tag":"span","props":{"style":{"color":"#98C379"}},"children":[{"type":"text","value":"\"PRESENCE_UPDATE\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" d: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7F848E"}},"children":[{"type":"text","value":"// Full Lanyard presence and an extra \"user_id\" field"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#ABB2BF"}},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"error-codes"},"children":[{"type":"text","value":"Error Codes"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Lanyard can disconnect clients for multiple reasons, usually to do with messages being badly formatted. Please refer to your WebSocket client to see how you should handle errors - they do not get received as regular messages."}]},{"type":"element","tag":"h4","props":{"id":"types-of-errors"},"children":[{"type":"text","value":"Types of Errors"}]},{"type":"element","tag":"error-types","props":{},"children":[]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"list-of-opcodes","depth":3,"text":"List of Opcodes"},{"id":"events","depth":3,"text":"Events"},{"id":"error-codes","depth":3,"text":"Error Codes"}]}},"_type":"markdown","_id":"content:api:working-with-websockets.md","_source":"content","_file":"api/working-with-websockets.md","_extension":"md"}