modl.gg
Developer API

Generate 2FA Token

Generate a two-factor authentication verification token for a staff member.

POST /v1/minecraft/staff/2fa/generate

Generate a two-factor authentication token for a staff member. The token and verification URL are returned so the staff member can complete the 2FA verification process.

Authentication

Requires the X-API-Key header with your server's API key.

X-API-Key: your-api-key-here

Request

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour server's API key.
Content-TypestringYesMust be application/json.

Body

FieldTypeRequiredDescription
minecraftUuidstringYesThe staff member's Minecraft UUID.
ipstringYesThe staff member's current IP address.
{
  "minecraftUuid": "550e8400-e29b-41d4-a716-446655440000",
  "ip": "192.168.1.1"
}

Response

200 OK

{
  "token": "abc123xyz",
  "verifyUrl": "https://panel.example.com/verify/abc123xyz"
}

Error Responses

Status CodeDescription
401Missing or invalid API key.
404Staff member not found.
429Rate limit exceeded.
500Internal server error.

On this page