Healthcheck

Healthcheck

The SDK includes a healthcheck mechanism to ensure the backend service is operational before sending requests. This helps prevent spamming the service when it’s down and provides quicker feedback to the developer.

Note

If you are experiencing a prolonged outage and have confirmed your DISCORD_VERIFY_KEY is correct, contact @Ocipa from BlackLeaf for assistance.

How it works

When an HTTP request to the verification service fails (e.g., during a verify.verify() call), the SDK will automatically perform a healthcheck. The healthcheck sends a request to the /health endpoint of the backend service.

This healthcheck has two main purposes:

  1. To check if the backend service is online and reachable.
  2. To validate your API key (DISCORD_VERIFY_KEY).

Cooldown Period

If the healthcheck fails, either because the service is down or because your API key is invalid, the SDK will enter a cooldown period.

  • By default, this cooldown lasts for about 10 minutes. The exact duration has some randomness to prevent multiple game servers from retrying at the same exact moment.
  • During this cooldown period, any function that would make a request to the backend (like verify.verify()) will immediately fail without sending any network requests.
  • A warning message will be printed to the Roblox Studio output, indicating that the healthcheck failed and that verification attempts will be blocked for the duration of the cooldown.

What this means for you

  • Resilience: The healthcheck system makes your game more resilient to temporary backend outages. Instead of requests timing out for a long time, they will fail fast during the cooldown.
  • Debugging: If you see the “Healthcheck failed” warning, it’s a strong indicator of one of a few problems:
    1. The discord-verify service is experiencing an outage.
    2. Your DISCORD_VERIFY_KEY secret is not configured correctly in your Roblox game. Please double-check the secrets setup guide.
    3. Your account was disabled.
  • No action required: This system is fully automatic. You don’t need to write any code to enable or manage the healthcheck. Simply be aware of the warning message in your output if you are having issues with verification.