Skip to content
Fluxer API

Applications

An application is an OAuth2 client with one bot account, and a user can own up to 25 of them. The routes on this page need a user session unless they say otherwise. A bot or OAuth2 bearer token on one of those routes gets 403 ACCESS_DENIED. A route that takes an application ID returns 404 UNKNOWN_APPLICATION when the application does not exist and 403 ACCESS_DENIED when you do not own it. The authorization flow and its tokens are on OAuth2.

The routes for an application you own return this object.

FieldTypeDescription
idsnowflakeThe ID of the application
namestringThe name of the application (1-100 characters)
redirect_urisarray[string]The redirect URIs registered for the application
bot_publicbooleanWhether any eligible user can install the bot
bot_require_code_grantbooleanWhether installing the bot needs an OAuth2 code grant
client_secret?1stringThe client secret for token exchange, introspection and revocation
bot?2application bot objectThe bot account the application owns

1 Returned only by Create application and Reset client secret

2 Not returned by Reset client secret

{
"id": "1501314428688998182",
"name": "Party Parrot",
"redirect_uris": ["https://example.com/callback"],
"bot_public": true,
"bot_require_code_grant": false
}

Each application has one bot account, and the bot's user ID is the same as the application ID.

FieldTypeDescription
idsnowflakeThe ID of the bot user
usernamestringThe username of the bot account
discriminatorstringThe four-digit discriminator of the bot account
avatar??stringThe avatar hash of the bot account
banner??stringThe banner hash of the bot account
bio?stringThe profile biography of the bot account
token?1stringThe bot token
mfa_enabled?booleanWhether the bot account has an authenticator
authenticator_types?array[integer]The authenticator types on the bot account
flagsintegerThe account's public user flags, including bot flags

1 Returned only by Create application

Anyone can see this version of an application, with or without a credential.

FieldTypeDescription
idsnowflakeThe ID of the application
namestringThe name of the application
icon?stringThe avatar hash of the bot account
description?stringAlways null
redirect_urisarray[string]The redirect URIs registered for the application
scopesarray[string]The OAuth2 scopes the application can be authorized for
bot_public1booleanWhether the requester can install the bot
bot?application bot objectThe bot account, without token, mfa_enabled or authenticator_types
current_user??partial user objectThe requesting account, or null without a credential

1 Always true for the application owner

This is the application that issued the bot token making the request.

FieldTypeDescription
idsnowflakeThe ID of the application
namestringThe name of the application
icon?stringThe avatar hash of the bot account
description?stringThe biography of the bot account
bot_publicbooleanWhether any eligible user can install the bot
bot_require_code_grantbooleanWhether installing the bot needs an OAuth2 code grant
verify_keystringA placeholder of 64 0 characters
ownerpartial user objectThe account that owns the application
bot?application bot objectThe bot account, without token
redirect_uris?array[string]The redirect URIs registered for the application

Update bot profile returns this object.

FieldTypeDescription
idsnowflakeThe ID of the bot user
usernamestringThe username of the bot account
discriminatorstringThe four-digit discriminator of the bot account
avatar?stringThe avatar hash of the bot account
banner?stringThe banner hash of the bot account
bio?stringThe profile biography of the bot account
flagsintegerThe account's public user flags, including bot flags

These bits are in the bot account's flags, and you set them with bot_flags in Update bot profile.

ValueNameDescription
1 << 4FRIENDLY_BOTThe bot accepts friend requests from users
1 << 5FRIENDLY_BOT_MANUAL_APPROVALThe bot needs manual approval for friend requests

Reset bot token returns this object.

FieldTypeDescription
tokenstringThe new bot token
botapplication bot objectThe bot account, without token
GET/v1/users/@me/applications

Returns every application the current user owns, without client secrets or bot tokens.

StatusBodyCondition
200array[application object]The applications were returned

The rate limit is 60 requests per minute, on the oauth_dev:clients:list bucket.

GET/v1/oauth2/applications/@meBot

Returns the same array as List owned applications for a user session, and the current bot application object for a bot token. OAuth2 bearer tokens get 403 ACCESS_DENIED.

StatusBodyCondition
200array[application object] | current bot application objectThe current application data was returned

The rate limit is 60 requests per minute, on the oauth_dev:clients:list bucket.

GET/v1/applications/@meBot

Returns the current bot application object for the bot token in the Authorization header.

StatusBodyCondition
200current bot application objectThe application was returned
401error responseINVALID_TOKEN when the header is missing, isn't a bot token or the application was deleted

The rate limit is 60 requests per minute, on the oauth_dev:clients:list bucket.

GET/v1/oauth2/applications/{id}/publicUnauthenticated

Returns the public application object for any application.

StatusBodyCondition
200public application objectThe application was returned

The rate limit is 60 requests per minute, on the oauth_dev:clients:list bucket.

POST/v1/oauth2/applications

Creates an application and its bot account, and returns the application object with the client secret and bot token. After this, only the reset routes return them. The bot's username is the application name when it's available, and a random name otherwise.

FieldTypeDescription
X-Captcha-Token?stringThe solved CAPTCHA token
FieldTypeDescription
namestringThe name of the application (1-100 characters)
redirect_uris?1?array[string]The redirect URIs to register (at most 10, each 1-256 characters)
bot_public?booleanWhether any eligible user can install the bot (default true)
bot_require_code_grant?booleanWhether installing the bot needs an OAuth2 code grant (default false)

1 Each URI must be an absolute HTTPS URL. HTTP is allowed for localhost, *.localhost and IP literals

StatusBodyCondition
200application objectThe application and its bot were created
400error responseMAX_APPLICATIONS when you already own 25 applications
403error responseYour account is unclaimed2
403error responseACCOUNT_VERIFICATION_REQUIRED when the instance needs a verified account and yours is not
403error responseCONTENT_BLOCKED when the name, a redirect URI or the bot username is blocked
500error responseBOT_USER_GENERATION_FAILED when no bot username is free

2 The error code is UNCLAIMED_ACCOUNT_CANNOT_CREATE_APPLICATIONS

The rate limit is 10 requests per hour, on the oauth_dev:clients:create bucket.

GET/v1/oauth2/applications/{id}

Returns one application object you own.

StatusBodyCondition
200application objectThe application was returned

The rate limit is 60 requests per minute, on the oauth_dev:clients:list bucket.

PATCH/v1/oauth2/applications/{id}

Updates an application you own and returns the application object.

FieldTypeDescription
name?stringThe name of the application (1-100 characters)
redirect_uris?1?array[string]The redirect URIs to register (at most 10)
bot_public?booleanWhether any eligible user can install the bot
bot_require_code_grant?booleanWhether installing the bot needs an OAuth2 code grant

1 The array replaces the whole set, and null clears it. Each URI follows the same rules as in Create application

StatusBodyCondition
200application objectThe application was updated
403error responseCONTENT_BLOCKED when the name or a redirect URI is blocked

The rate limit is 30 requests per minute, on the oauth_dev:clients:update::client_id bucket.

PATCH/v1/oauth2/applications/{id}/bot

Updates the bot account of an application you own and returns the bot profile object. An omitted field stays as it is, and null clears it. The update also clears the bot's display name, and Fluxer sends User Update to the bot's sessions.

FieldTypeDescription
username?1stringThe username of the bot account (1-32 letters, digits or underscores)
discriminator?2string | integerThe current discriminator of the bot account
avatar?3?stringThe base64-encoded avatar image
banner?3?stringThe base64-encoded banner image
bio??stringThe profile biography (0-1024 characters)
bot_flags?4integerBot flags

1 Changing the username beyond letter case gives the bot a new random discriminator. You can change the username 5 times per 3 hours, and after that the request fails with USERNAME_CHANGED_TOO_MANY_TIMES

2 Any value other than the current discriminator fails with BOT_DISCRIMINATOR_CANNOT_BE_CHANGED

3 The image must fit the avatar_max_size limit

4 Fluxer sets or clears only the bot flags and ignores other bits

StatusBodyCondition
200bot profile objectThe profile was updated
400error responseUSERNAME_NOT_AVAILABLE when no discriminator is free for the username
403error responseCONTENT_BLOCKED when the username or biography is blocked
404error responseBOT_USER_NOT_FOUND when the application has no bot account

The rate limit is 30 requests per minute, on the oauth_dev:clients:update::client_id bucket.

POST/v1/oauth2/applications/{id}/bot/reset-tokenMFA

Issues a new bot token for an application you own and returns the bot token reset object. You need sudo mode.

The body is a sudo verification object.

StatusBodyCondition
200bot token reset objectThe token was rotated
404error responseBOT_USER_NOT_FOUND when the application has no bot account

The rate limit is 10 requests per hour, on the oauth_dev:clients:rotate_secret::client_id bucket.

POST/v1/oauth2/applications/{id}/client-secret/resetMFA

Issues a new client secret for an application you own and returns the application object with it. You need sudo mode. The old secret stops working at once, and access and refresh tokens already issued stay valid.

The body is a sudo verification object.

StatusBodyCondition
200application objectThe client secret was rotated

The rate limit is 10 requests per hour, on the oauth_dev:clients:rotate_secret::client_id bucket.

DELETE/v1/oauth2/applications/{id}MFA

Deletes an application you own. You need sudo mode.

The body is a sudo verification object.

StatusBodyCondition
204emptyThe application was deleted

The rate limit is 10 requests per hour, on the oauth_dev:clients:delete::client_id bucket.