API reference
Gateway and instance
Where the gateway is, and what this server has switched on.
Get Instance
/instanceNo sign-in neededtether onlyWhat this tether server is called, and which features it has switched on.
Needs no sign-in. Read it before you rely on a feature: voice_enabled is false on a server with no LiveKit, gifs_available says whether GIF search is on. max_upload_bytes is the most bytes one file may have (bots too); owner_max_upload_bytes is the larger limit platform owners have. The name is the product name of the server you are talking to (tether, or whatever its operator called it); never hard-code it.
Who can call it
- No sign-in is needed (public).
- A person, with a session token.
- A bot, with its token.
Response
200 APIInstanceInfo
{
"name": "tether",
"version": "0.1.0",
"registration_enabled": true,
"api_version": 1,
"voice_enabled": true,
"gifs_available": false,
"push_public_key": null,
"email_required": false,
"invite_url": "https://chat.example.com",
"email_codes": false,
"max_upload_bytes": 26214400,
"owner_max_upload_bytes": 524288000,
"free_share_max_height": 720,
"free_share_max_fps": 30
}
Discord
Only on tether: Discord has no such route.
Discord has no such route.
Get Gateway
/gatewayNo sign-in neededThe WebSocket address of the gateway. No sign-in needed.
A plain discord.Client in discord.py never calls this: set DiscordWebSocket.DEFAULT_GATEWAY to the address it answers. In dev:lite the address is the Vite origin; connect to the server's own port there.
Who can call it
- No sign-in is needed (public).
- A person, with a session token.
- A bot, with its token.
Response
200 APIGatewayInfo
{
"url": "wss://chat.example.com/gateway"
}
Discord
The same as Discord’s Get Gateway.
Get Gateway Bot
/gateway/botPeople and botsThe gateway address and Discord's sharding numbers; discord.js asks for it before it connects.
tether runs one shard, always: shards is 1 and session_start_limit never runs out. Sessions resume only on the same server process.
Response
{
"url": "wss://chat.example.com/gateway",
"shards": 1,
"session_start_limit": {
"total": 1000,
"remaining": 1000,
"reset_after": 0,
"max_concurrency": 1
}
}
Errors
UNAUTHORIZED40001 · HTTP 401- No valid token was sent.
Discord
Like Discord’s Get Gateway Bot, with differences.
One shard only; the session limits are placeholders.