Skip to main content

CreateOAuth2LinkOptions

@discordeno/utils


Documentation / @discordeno/utils / CreateOAuth2LinkOptions

Interface: CreateOAuth2LinkOptions

Defined in: packages/utils/src/oauth2.ts:21

Properties

clientId

clientId: BigString

Defined in: packages/utils/src/oauth2.ts:30

The id of the application


disableGuildSelect?

optional disableGuildSelect: boolean

Defined in: packages/utils/src/oauth2.ts:74

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


guildId?

optional guildId: BigString

Defined in: packages/utils/src/oauth2.ts:67

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


integrationType?

optional integrationType: DiscordApplicationIntegrationType

Defined in: packages/utils/src/oauth2.ts:85

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.


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")[]

Defined in: packages/utils/src/oauth2.ts:60

The permissions of the invited bot

Remarks

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


prompt?

optional prompt: "consent" | "none"

Defined in: packages/utils/src/oauth2.ts:53

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.


redirectUri?

optional redirectUri: string

Defined in: packages/utils/src/oauth2.ts:45

The redirect uri for after the authentication

Remarks

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


responseType?

optional responseType: "code" | "token"

Defined in: packages/utils/src/oauth2.ts:28

The type of response

Remarks

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


scope

scope: OAuth2Scope[]

Defined in: packages/utils/src/oauth2.ts:32

The scopes for the application


state?

optional state: string

Defined in: packages/utils/src/oauth2.ts:38

The optional state for security

See

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