MC-Verify
/ Documentation
Dashboard
Getting Started

Introduction

MC-Verify is a powerful authentication service that allows you to verify users through their Minecraft accounts. Build secure applications with confidence knowing your users are who they claim to be.

How MC-Verify Works

1

User Joins Server

User connects to the MC-Verify Minecraft server

2

Receive Code

A unique verification code is generated and displayed

3

Verify Identity

User enters code on your site, you receive confirmed identity

Quick Integration

Get started in minutes with our simple API and SDKs for popular languages.

Secure by Design

Built with security best practices, including encrypted tokens and rate limiting.

Quickstart

Get up and running with MC-Verify in under 5 minutes.

1 Create an Application

Sign up for MC-Verify and create a new application in your dashboard. You'll receive a Client ID and Client Secret.

2 Install the SDK

Terminal
npm install @mc-verify/sdk

3 Initialize the Client

JavaScript
import { MCVerify } from '@mc-verify/sdk';

const client = new MCVerify({
  clientId: 'your_client_id',
  clientSecret: 'your_client_secret'
});

4 Verify a User

JavaScript
// Verify a code submitted by the user
const result = await client.verify('ABC123');

if (result.success) {
  console.log('Verified:', result.player.username);
  console.log('UUID:', result.player.uuid);
}

Authentication

All API requests require authentication using your API key or OAuth credentials.

Keep your credentials secure

Never expose your API key or client secret in client-side code. Always make API calls from your server.

API Key Authentication

Include your API key in the Authorization header:

HTTP Header
Authorization: Bearer your_api_key_here

OAuth 2.0

For user-facing applications, we recommend using OAuth 2.0 with the authorization code flow.

OAuth Authorization URL
https://api.mc-verify.com/oauth/authorize
  ?client_id=your_client_id
  &redirect_uri=https://yourapp.com/callback
  &response_type=code
  &scope=verify:read user:read
API Reference

API Overview

The MC-Verify API is organized around REST. All requests should be made to the base URL:

https://api.mc-verify.com/v1

Available Endpoints

GET /verify/:code Verify a code
POST /verify/request Request a verification
GET /users/:uuid Get user info
GET /users/:uuid/verifications Get user verifications
POST /webhooks Create webhook
DELETE /webhooks/:id Delete webhook

Verification

Verify Minecraft accounts using codes generated by players on the verification server.

GET /verify/:code

Verify a code and retrieve the associated Minecraft player information.

Parameters

Name Type Description
code string The 6-character verification code

Response

JSON Response
{
  "success": true,
  "player": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "username": "Steve",
    "verified_at": "2024-01-15T10:30:00Z"
  },
  "metadata": {
    "ip_country": "US",
    "client_version": "1.20.4"
  }
}

Error Handling

MC-Verify uses conventional HTTP response codes to indicate the success or failure of an API request.

Code Status Description
200 OK Request succeeded
400 Bad Request Invalid parameters provided
401 Unauthorized Invalid or missing API key
404 Not Found Resource doesn't exist
429 Too Many Requests Rate limit exceeded
500 Server Error Something went wrong on our end
SDKs

JavaScript SDK

Our official JavaScript SDK works in both Node.js and browser environments.

Installation

Terminal
npm install @mc-verify/sdk
# or
yarn add @mc-verify/sdk
# or
pnpm add @mc-verify/sdk

Usage Example

JavaScript
import { MCVerify } from '@mc-verify/sdk';

const client = new MCVerify({
  clientId: process.env.MCVERIFY_CLIENT_ID,
  clientSecret: process.env.MCVERIFY_CLIENT_SECRET
});

// Verify a code
async function verifyPlayer(code) {
  try {
    const result = await client.verify(code);
    return result.player;
  } catch (error) {
    console.error('Verification failed:', error.message);
  }
}