Discord Bot Integrations
Discord Bot API
Build community pages, widgets, partner dashboards, and server-owner tools using TCM Discord bot data. Read endpoints expose safe public bot data. Management endpoints only work for servers where the developer app owner has a linked Discord account and Discord management permissions.
1. Create a service client
Use audience service.discord. Request read scopes for public data and management scopes only for the server actions your app needs.
2. Mint a token
Call /mana/oauth/token with client_credentials and resource=service.discord. Keep your client secret server-side.
3. Call the API
Send Authorization: Bearer <token> to the Discord Bot API endpoints. Tokens must have audience service.discord.
Available Endpoints
/mana/discord/api/v1/status
Bot runtime status and public API capabilities.
/mana/discord/api/v1/giveaways
Active public giveaways across servers.
/mana/discord/api/v1/guilds/{guildId}
Safe public metadata for a server where the bot is installed.
/mana/discord/api/v1/guilds/{guildId}/levels/leaderboard
Public server XP leaderboard.
/mana/discord/api/v1/guilds/{guildId}/economy/leaderboard
Public server credit leaderboard.
/mana/discord/api/v1/me/guilds
Bot servers the developer app owner can manage.
/mana/discord/api/v1/guilds/{guildId}/management
Dashboard-equivalent setup data for one managed server.
/mana/discord/api/v1/guilds/{guildId}/giveaways
Create a giveaway using dashboard-equivalent validation.
/mana/discord/api/v1/guilds/{guildId}/leveling/config
Update server leveling settings.
/mana/discord/api/v1/guilds/{guildId}/economy/config
Update server economy and reward shop settings.
/mana/discord/api/v1/guilds/{guildId}/commands/refresh
Refresh slash commands for one managed server.
Safety Boundaries
Management calls require a valid service.discord token, the matching scope, an active developer app, a linked Discord ID for the app owner, and current Discord permissions on the target server. The API does not allow arbitrary Discord messages, moderation actions, private member dumps, or bypassing per-server permissions.