v1.0.0


TGLSC API

A robust API for tracking real-time Discord presence, activities, and Spotify status.

REST API

Fetch a user's current status via a simple HTTP GET request.

GET https://api.marki.my/v1/users/{user_id}

Response Example

{
  "success": true,
  "data": {
    "discord_user": {
      "id": "1053571917665280010",
      "username": "Marki",
      "global_name": "Marki",
      "avatar": "https://cdn.discordapp.com/..."
    },
    "discord_status": "online",
    "activities": [
      {
        "name": "Visual Studio Code",
        "assets": {
          "large_image": "https://cdn.discordapp.com/...",
          "small_image": "https://cdn.discordapp.com/..."
        }
      }
    ],
    "listening_to_spotify": true,
    "spotify": {
      "song": "Never Gonna Give You Up",
      "artist": "Rick Astley",
      "album_art_url": "https://i.scdn.co/..."
    }
  }
}

WebSocket API

Connect for real-time event streaming.

WSS wss://api.marki.my/socket

1. Connection & Handshake (Op 2)

Send this immediately after opening the connection.

{
  "op": 2,
  "d": {
    "subscribe_to_id": "1053571917665280010"
  }
}

2. Heartbeat (Op 3)

The server will send an INIT_STATE payload with a heartbeat_interval. You must send Op 3 periodically.

{
  "op": 3
}