Applications & OAuth2
Every bot is tied to an application. This page is about the endpoints your bot can use to manage its application and itself programmatically. Most bots don’t need these (the UI covers everything), but they’re useful for automation and CI pipelines.
GET /applications/@me
Section titled “GET /applications/@me”Returns the application the current bot token belongs to.
curl https://floodilka.com/api/v1/applications/@me \ -H "Authorization: Bot YOUR_BOT_TOKEN"{ "id": "1496956937664585746", "name": "XP Bot", "icon": null, "description": "Leveling bot", "bot_public": true, "bot_require_code_grant": false, "owner": { "id": "974...", "username": "puncher" }, "redirect_uris": [], "bot_user_id": "1496956937664585746"}| Field | Type | Description |
|---|---|---|
id | snowflake | Application ID (same as client_id in the OAuth2 URL) |
name | string | Application name |
icon | string | null | Icon hash |
description | string | null | Description (shown in the authorization dialog) |
bot_public | boolean | Whether anyone can add the bot via the OAuth2 URL |
bot_require_code_grant | boolean | Require the full authorization code flow before adding |
owner | User | Application owner |
redirect_uris | array of string | Registered redirect URIs (for OAuth2 integrations) |
bot_user_id | snowflake | ID of the bot user attached to the application |
PATCH /applications/@me
Section titled “PATCH /applications/@me”Updates application settings. Only the owner can call this with a bot token.
curl -X PATCH https://floodilka.com/api/v1/applications/@me \ -H "Authorization: Bot YOUR_BOT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "description": "A new description", "bot_public": false }'Allowed fields: name, description, icon (data URL), bot_public, bot_require_code_grant, redirect_uris.
POST /applications/@me/bot/reset-token
Section titled “POST /applications/@me/bot/reset-token”Resets the bot token. The old token is invalidated immediately — any running processes using it start getting 401 Unauthorized.
Only the application owner or UI can call this. A bot cannot reset its own token (ACCESS_DENIED) — this is so a compromised token can’t lock out the owner.
Response contains the new token:
{ "token": "1496956937664585746.NEW_SECRET" }Shown only once. Save immediately.
PATCH /applications/@me/bot
Section titled “PATCH /applications/@me/bot”Updates the bot user’s public profile (name, avatar, bio). Equivalent to PATCH /users/@me, but works for both owner and bot tokens.
curl -X PATCH https://floodilka.com/api/v1/applications/@me/bot \ -H "Authorization: Bot YOUR_BOT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "username": "cool_bot", "avatar": "data:image/png;base64,iVBORw0KGgo..." }'What’s next
Section titled “What’s next”- Inviting your bot — build the OAuth2 URL to add the bot to a server
- Quickstart — your first token-backed request
- Authentication — token format and storage