Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

API

From Harry's Wiki


This page documents the official Harry's Network API, which allows developers to create mods and applications that interact with server data.

Getting an API Key

To obtain an API key:

  1. You must have at least VIP rank on the server
  2. Log into the Minecraft server
  3. Type /api in chat
  4. Your API key will be provided to you

⚠️ Warning: Keep your API key private. Do not share it with others.

API Endpoints

HTTP API

Base URL

https://wss.harrys.gg:2053

GET /profile

Retrieves profile information for a player.

Parameters:

Parameter Type Description
apikey string Your API key
uuid string The player's Minecraft UUID (with dashes)

Example Request:

GET https://wss.harrys.gg:2053/profile?apikey=YOUR_API_KEY&uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Response Data:

  • Inventory items
  • Armor items
  • Coins
  • Megacoins
  • Coins grinded this prestige
  • Coins requirement for next prestige
  • Rank
  • Prestige number
  • Level
  • Guild
  • Equipped megastreak
  • Equipped killstreaks
  • Equipped perks
  • Equipped blessing

Error Responses:

Code Error Description
400 Missing apikey or uuid Required parameters not provided
400 Invalid UUID format UUID must be in standard format with dashes
403 Invalid API Key The provided API key is not valid
504 Gateway Timeout Server did not respond in time

WebSocket API

Connection

wss://wss.harrys.gg:2053

Authentication Flow

  1. Connect to the WebSocket
  2. Server sends: {"type": "auth_request"}
  3. Client responds: {"type": "auth", "apikey": "YOUR_API_KEY"}
  4. On success, server sends: {"type": "auth_success"}

ℹ️ Note: You must authenticate within 1 second of connecting or the connection will be closed.

Requesting a Profile

Request:

{"type": "profile", "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}

Response:

{"type": "profile_requested", "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}

The profile data will be sent in a subsequent message with "type": "profile".

Live Data Stream

When you are online on the Minecraft server and connected to the WebSocket, you will automatically receive data every second containing:

  • Equipped perks
  • Equipped killstreaks
  • Equipped megastreak
  • Current monk buff (if active)
  • Riftwalker charges
  • Apocalypse count
  • Booster info (remaining time, multiplier)
  • Battlepass challenges and progression

Example Code

JavaScript WebSocket Example

const ws = new WebSocket('wss://wss.harrys.gg:2053');

ws.onmessage = (event) => {
    const data = JSON.parse(event.data);
    
    if (data.type === 'auth_request') {
        ws.send(JSON.stringify({ type: 'auth', apikey: 'YOUR_API_KEY' }));
    } else if (data.type === 'auth_success') {
        console.log('Connected!');
        // Request a profile
        ws.send(JSON.stringify({ type: 'profile', uuid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' }));
    } else if (data.type === 'profile') {
        console.log('Profile data:', data.content);
    } else if (data.type === 'info') {
        console.log('Info about myself:', data.content);
    }
};

See Also