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.
Handler requirements
- Accept
POSTwith a JSON body. - Read the
X-Signature-Timestamp(Unix time as a string) andX-Signature-Ed25519(hex signature) headers. - Verify the signature of
timestamp + raw body: the UTF-8 bytes of the timestamp followed directly by the unchanged body bytes. - Answer 2xx only for a valid signature, otherwise 4xx.
Public key
Ed25519, base64, SPKI format:Node.js example
- 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.