Repository navigation
Classic Authentication Flow
Haylee Schäfer edited this page Jun 1, 2021
·
4 revisions
POST https://api.minecraft.id/auth/start
| 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 |
| 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) |
GET https://api.minecraft.id/auth/authorize/<id>
| 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)
GET <callback_url>
| 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 |
POST https://api.minecraft.id/auth/status/<id>
| 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 |
| 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) |
