Skip to content

Classic Authentication Flow

Haylee Schäfer edited this page Jun 1, 2021 · 4 revisions

Authentication Flow (Classic)

1. Start an authentication request via the API

POST https://api.minecraft.id/auth/start

Parameters

Name Type Description
username string The username to authenticate
request_id string A unique identifier for the request.
request_secret string A secret unique string to later verify the result.
request_ip string IP address of the client to authenticate.
request_callback string An URL to send the user to after the authentication is finished

Returned Parameters

Name Type Description
id string Unique ID of this request (Note that this is not the same as the request_id you specified, but it's used as an identifier for the API
code string A secret string used to later verify the callback & get the authentication result
status string Status of the request (Should be STARTED for this endpoint)

2. Redirect user to start authentication

GET https://api.minecraft.id/auth/authorize/<id>

Parameters

Name Type Description
id string ID returned by the start request
request_id string Same as the request_id from the start request
username string Username to authenticate - Same as username from the start request
style string (optional) simple for simple style

(2.1. User logs into the Minecraft server with their account and verifies it via a token)

3. User is redirected to your specified callback_url

GET <callback_url>

Parameters

Name Type Description
id string The ID received in the start request
request_id string The request_id you specified
code string The 'code' you received in the start request

4. Check the authentication result via the API

POST https://api.minecraft.id/auth/status/<id>

Parameters

Name Type Description
id string The ID received in the start request
request_id string The request_id you specified
request_secret string The request_secret you specified
code string The code you received in the start request

Returned Parameters

Name Type Description
status string Either VERIFIED if the username was verified, or NOT_VERIFIED
fail_reason string (Optional) Detailed reason why the username was not verified (TIMEOUT_LOGIN, TIMEOUT_TOKEN, INVALID_TOKEN)