Authentication
AsyncAnticheat uses automatic token-based authentication. No manual configuration needed!
For Server Owners
Linking Your Server (Managed Service)
The AsyncAnticheat plugin automatically handles authentication:
- Install the plugin - Drop the JAR into your
/plugins/folder - Start your server - The plugin generates a unique server token
- Click the link - A registration link appears in console
- Sign in - Log in with GitHub, Discord, or Email
- Done! - Your server is linked and authenticated
The plugin automatically:
- Generates a secure server token
- Stores it locally
- Uses it to authenticate all API requests
- Handles token rotation if needed
Dashboard Authentication
Access your dashboard at asyncanticheat.com using:
- GitHub (recommended for developers)
- Discord (recommended for server owners)
- Email (magic link or password)
Once signed in, you’ll see all servers you’ve linked.
For Self-Hosted APIs
If you’re self-hosting the AsyncAnticheat API, you’ll need to manage tokens manually.
Ingest Token
Used by the Minecraft plugin to upload packet batches.
Authorization: Bearer <INGEST_TOKEN>Configure in your plugin’s config.yml:
api:
url: "https://your-api.example.com"
token: "your_ingest_token"Module Callback Token
Used by detection modules to submit findings.
Authorization: Bearer <MODULE_CALLBACK_TOKEN>This is configured in the API’s environment:
MODULE_CALLBACK_TOKEN="your_module_callback_token"Generating Tokens
Generate secure random tokens:
# Using openssl
openssl rand -hex 32
# Using Python
python3 -c "import secrets; print(secrets.token_hex(32))"Add to your .env:
INGEST_TOKEN="generated_token_here"
MODULE_CALLBACK_TOKEN="another_generated_token"Security Best Practices
- Never commit tokens - Use environment variables or secrets management
- Rotate tokens periodically - Especially after team member changes
- Use separate tokens - Different tokens for different environments (dev/staging/prod)
- Monitor usage - Check for unusual API patterns
Error Responses
401 Unauthorized
{
"error": "Invalid or missing authorization token",
"code": "UNAUTHORIZED"
}Causes:
- Missing
Authorizationheader - Invalid token
- Expired token
403 Forbidden
{
"error": "Token does not have permission for this resource",
"code": "FORBIDDEN"
}Causes:
- Using ingest token for module callback endpoint
- Using module token for ingest endpoint
Last updated on