Test endpoint

A sandbox copy of the key check with its own messages, emulator and signature domain.

Keep in mind

Off until you switch it on
Turn it on in Connect Settings or with edit-soft and test_connect_enabled. While it is off the address answers 404.
Needs a secure secret
With signing on and no secure test secret, every call answers 503.
Own texts
The test_err_* messages and test_emulator_response are set apart from the main ones.
Always HMAC
Test tokens are always hmac-sha256, whatever the main endpoint uses.

Test a key

POST https://dev.mod.wtf/{soft_id}/test/connect

Same fields as the key check. Form-urlencoded only, Accept: application/json, body up to 4096 bytes.

Form fields

  • game string required

    Game or product. Up to 32 characters.

  • user_key string required

    License key. Up to 32 characters. Pattern ^[A-Za-z0-9:@_-]{1,32}$.

  • serial string required

    Device identifier (HWID). Up to 255 characters. No commas, quotes or control characters.

POST /{soft_id}/test/connect HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/x-www-form-urlencoded
Accept: application/json

game=pubg&user_key=XXXX-XXXX-XXXX-XXXX&serial=device-id

Signature domain

Test tokens are signed over a source with a fixed prefix, so a test answer can never pass as a real one.

Test source and an example
modkey-connect-v2|test|{{soft_id}}|{{game}}|{{key}}|{{serial}}
modkey-connect-v2|test|{soft_id}|pubg|XXXX-XXXX-XXXX-XXXX|device-id
Token
hex(HMAC-SHA256(source, CONNECT_SECRET))

HTTP statuses

HTTP When
200 Validation result, including normal license denials
404 Endpoint unavailable
413 Request body exceeds 4096 bytes
429 Request rate limit exceeded
500 Could not generate a response
503 Temporary server failure, or Test Connect is disabled because its configuration is insecure
Esc