MCUV: Minecraft Username Verifier API Documentation

Introduction

The Minecraft Username Verifier API is a service that allows you to verify Minecraft usernames and prevent impersonators from passing through. It utilizes Microsoft OAuth2 for user authentication and validation.

Getting Whitelisted

MCUV is currently private and catering to major Minecraft discord and services. There is no ETA on when we will go public. Please send a email to contact@mcusernameapi.online if you are interested.

Base URL

        https://mcusernameapi.online
    

Endpoints

/generate

This endpoint generates a state token for the provided Minecraft username and redirect URL. Requests with a invalid API key will be ignored.

Request

HTTP Method: POST

        
POST /generate
Content-Type: application/json

{
    "minecraft_username": "example_username",
    "redirect_url": "https://your-redirect-url.com",
    "api_key": "testing-testing-testing-testing-testing"
}
        
    

Response

The response will include a state token that should be used in subsequent requests.

        
{
    "state_token": "your_state_token"
}
        
    

/connect

After generating the state token, the user should be redirected to this endpoint to go through the Microsoft OAuth2 scheme for authentication. The state token should be included as a query parameter. Requests with a invalid state token will be ignored.

Request

HTTP Method: GET

Redirect the user to:

        
https://mcusernameapi.online/connect/your_state_token
        
    

/check

Use this endpoint to check if a state token was recently authorized with a specific Minecraft username. Requests with a invalid API key will be ignored.

Request

HTTP Method: GET

Include the state token and Minecraft username as query parameters:

        
            GET /check
            Content-Type: application/json
            
            {
                "state": "your_state_token",
                "minecraft_username": "example_username",
                "api_key": "testing-testing-testing-testing-testing"
            }
        
    

Response

The API will respond with a verification status.

        
{
    "verified": true
}
        
    

Errors

In case of any errors, the API will respond with appropriate error messages and HTTP status codes.