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
User Joins Server
User connects to the MC-Verify Minecraft server
Receive Code
A unique verification code is generated and displayed
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
npm install @mc-verify/sdk
3 Initialize the Client
import { MCVerify } from '@mc-verify/sdk';
const client = new MCVerify({
clientId: 'your_client_id',
clientSecret: 'your_client_secret'
});
4 Verify a User
// 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:
Authorization: Bearer your_api_key_here
OAuth 2.0
For user-facing applications, we recommend using OAuth 2.0 with the authorization code flow.
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 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
/verify/:code
Verify a code
/verify/request
Request a verification
/users/:uuid
Get user info
/users/:uuid/verifications
Get user verifications
/webhooks
Create webhook
/webhooks/:id
Delete webhook
Verification
Verify Minecraft accounts using codes generated by players on the verification server.
/verify/:code
Verify a code and retrieve the associated Minecraft player information.
Parameters
| Name | Type | Description |
|---|---|---|
| code | string | The 6-character verification code |
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 |
JavaScript SDK
Our official JavaScript SDK works in both Node.js and browser environments.
Installation
npm install @mc-verify/sdk
# or
yarn add @mc-verify/sdk
# or
pnpm add @mc-verify/sdk
Usage Example
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);
}
}