Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 1.68 KB

client_authorize.md

File metadata and controls

26 lines (22 loc) · 1.68 KB

authorize message (client)

The client should send an authorize message upon first connecting to a Ribbon and receiving a hello message. The Ribbon will respond with an authorize message.

Format

  • (object):
    • (integer) id: The id of this message.
    • (string) command: Always "authorize".
    • (object) data:
      • (string) token: The authentication token of the bot user. This is sensitive information and should never be shared with anyone, no exceptions. Do not store it in your code.
      • (Handling) handling: The bot user's handling.
      • (object) signature:
        • (string) mode?: Always "production" in practice but could probably be "debug" or something.
        • (string) version?: The human-readable version of TETR.IO being targeted (e.g. "1.0.0").
        • (boolean) countdown?: Always false. Was used to signify the countdown to the launch of TETR.IO.
        • (object) commit: Information regarding the commit of TETR.IO being targeted. This is the only required property of signature.
          • (string) id: Commit id.
          • (integer) time?: The Unix timestamp of the commit in milliseconds.
        • (string) serverCycle?: Unknown.
        • (object) build?:
          • (string) id?: Build id.
          • (integer) time?: The Unix timestamp of the build in milliseconds.
      • (string) i?: Unknown. Some sort of hash or other such hexadecimal string.

The latest signature data can be found at the environment API.