Skip to main content

CreateOAuth2LinkOptions

@discordeno/utilsDocs


Documentation / @discordeno/utils / CreateOAuth2LinkOptions

Interface: CreateOAuth2LinkOptions

Properties

clientId

clientId: BigString

The id of the application

Defined in

packages/utils/src/oauth2.ts:30


disableGuildSelect?

optional disableGuildSelect: boolean

Disallows the user from changing the guild dropdown if set to true

Remarks

Should be defined only in a bot authorization flow, with advanced bot authorization or with the webhook.incoming scope

Defined in

packages/utils/src/oauth2.ts:74


guildId?

optional guildId: BigString

Pre-fills the dropdown picker with a guild for the user

Remarks

Should be defined only in a bot authorization flow or with advanced bot authorization or with the webhook.incoming scope

Defined in

packages/utils/src/oauth2.ts:67


integrationType?

optional integrationType: DiscordApplicationIntegrationType

Specifies the installation context for the authorization

Remarks

Should be defined only when scope includes OAuth2Scope.ApplicationsCommands.

When set to GuildInstall (0) the application will be authorized for installation to a server, and when set to UserInstall (1) the application will be authorized for installation to a user.

The application must be configured in the Developer Portal to support the provided integrationType.

Defined in

packages/utils/src/oauth2.ts:85


permissions?

optional permissions: BigString | ("CREATE_INSTANT_INVITE" | "KICK_MEMBERS" | "BAN_MEMBERS" | "ADMINISTRATOR" | "MANAGE_CHANNELS" | "MANAGE_GUILD" | "ADD_REACTIONS" | "VIEW_AUDIT_LOG" | "PRIORITY_SPEAKER" | "STREAM" | "VIEW_CHANNEL" | "SEND_MESSAGES" | "SEND_TTS_MESSAGES" | "MANAGE_MESSAGES" | "EMBED_LINKS" | "ATTACH_FILES" | "READ_MESSAGE_HISTORY" | "MENTION_EVERYONE" | "USE_EXTERNAL_EMOJIS" | "VIEW_GUILD_INSIGHTS" | "CONNECT" | "SPEAK" | "MUTE_MEMBERS" | "DEAFEN_MEMBERS" | "MOVE_MEMBERS" | "USE_VAD" | "CHANGE_NICKNAME" | "MANAGE_NICKNAMES" | "MANAGE_ROLES" | "MANAGE_WEBHOOKS" | "MANAGE_GUILD_EXPRESSIONS" | "USE_SLASH_COMMANDS" | "REQUEST_TO_SPEAK" | "MANAGE_EVENTS" | "MANAGE_THREADS" | "CREATE_PUBLIC_THREADS" | "CREATE_PRIVATE_THREADS" | "USE_EXTERNAL_STICKERS" | "SEND_MESSAGES_IN_THREADS" | "USE_EMBEDDED_ACTIVITIES" | "MODERATE_MEMBERS" | "VIEW_CREATOR_MONETIZATION_ANALYTICS" | "USE_SOUNDBOARD" | "CREATE_GUILD_EXPRESSIONS" | "CREATE_EVENTS" | "USE_EXTERNAL_SOUNDS" | "SEND_VOICE_MESSAGES" | "SEND_POLLS" | "USE_EXTERNAL_APPS")[]

The permissions of the invited bot

Remarks

Should be defined only in a bot authorization flow or with advanced bot authorization

Defined in

packages/utils/src/oauth2.ts:60


prompt?

optional prompt: "consent" | "none"

The type of prompt to give to the user

Remarks

If set to none, it will skip the authorization screen and redirect them back to your redirect URI without requesting their authorization. For passthrough scopes, like bot and webhook.incoming, authorization is always required.

Defined in

packages/utils/src/oauth2.ts:53


redirectUri?

optional redirectUri: string

The redirect uri for after the authentication

Remarks

Should be defined only if using either OAuth2 authorization, implicit or not, or advanced bot authorization

Defined in

packages/utils/src/oauth2.ts:45


responseType?

optional responseType: "code" | "token"

The type of response

Remarks

Should be defined only if using either OAuth2 authorization, implicit or not, or advanced bot authorization

Defined in

packages/utils/src/oauth2.ts:28


scope

scope: OAuth2Scope[]

The scopes for the application

Defined in

packages/utils/src/oauth2.ts:32


state?

optional state: string

The optional state for security

See

https://discord.com/developers/docs/topics/oauth2#state-and-security

Defined in

packages/utils/src/oauth2.ts:38