Open protocol of MyChat enterprise messenger
"For developers", "Open protocol".
Open protocol of MyChat data exchange.
Official description
Copyright (c) 2012-2019 by Alexey Pikurov / Network Software Solutions
All commands are divided into two types: "client - server" and "server - client". Command of the first type begins with the prefix "cs" (Client->Server), the second type "sc" (Server->Client). Names are nominal. Hexadecimal text codes will be instead of these text constants.
Each command consists from a couple of parts:
1. MagicString 2 bytes #23#6
2. command identifier, HEX code in text format, 4 bytes (encoded 2 bytes);
3. flags, HEX code in a text format, 2 bytes (encoded 1 byte);
1 bit: package archived by GZIP or not. "1" archived, "0" not archived.
2, 3, and 4 bits: sender's command class. By default "000" (a program's core), left without changes, and after processing a command this code sent back with a result, if any. Command classes can be the following:
"000" - program's core;
"001" - text console;
"010" - Plugins API;
"100" - Scripts API;
"011" - Integration API;
"111" - Custom API (5.2+);
"110", "101" - reserved for future extensions;
bits 5, 6, 7 и 8 - reserved;
4. JSON object. If it was archived by GZIP, then the object will be a text string in BASE64 encoding. If there is no compression, the string will be in open view.
5. CRLF (#13#10) - ending block (2 bytes).
All parameters in commands are nominal and given for example. All parameters are necessary.
A full protocol is on the official website (in Russian) and updated from version to version.