Skip to main content
The API forwards game server events to your URL. Every request is signed with Ed25519, and your handler must verify the signature.

Setup

1

Open the webhooks page

Sign in and open erlcrussia.com/my/tokens/webhooks. Access is granted through a ticket; see How to get a key.
2

Add a URL

Enter your handler address and click “Check”. The API sends two test requests: one with a valid signature and one with a forged one.
3

Pass the check

The URL is saved only if the handler answers 2xx to the valid request and 4xx to the forged one.
Discord webhook links do not work: you need your own handler.

Handler requirements

  1. Accept POST with a JSON body.
  2. Read the X-Signature-Timestamp (Unix time as a string) and X-Signature-Ed25519 (hex signature) headers.
  3. Verify the signature of timestamp + raw body: the UTF-8 bytes of the timestamp followed directly by the unchanged body bytes.
  4. Answer 2xx only for a valid signature, otherwise 4xx.

Public key

Ed25519, base64, SPKI format:

Node.js example

Common mistakes:
  • verifying parsed and re-serialized JSON instead of the raw bytes;
  • adding a space or separator between the timestamp and the body;
  • decoding the signature as base64 instead of hex;
  • the framework consumes the body before you get the raw bytes.

Which events are sent

  • in-game messages starting with ;, for your own in-game commands;
  • emergency calls.
More events may be added. Webhooks do not replace the HTTP API or the WebSocket.