CreateOAuth2LinkOptions
Documentation / @discordeno/utils / CreateOAuth2LinkOptions
Interface: CreateOAuth2LinkOptions
Defined in: packages/utils/src/oauth2.ts:58
Properties
clientId
clientId:
BigString
Defined in: packages/utils/src/oauth2.ts:67
The id of the application
codeChallenge?
optionalcodeChallenge:string
Defined in: packages/utils/src/oauth2.ts:128
The code challenge used to verify the authorization request
See
https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
codeChallengeMethod?
optionalcodeChallengeMethod:"S256"
Defined in: packages/utils/src/oauth2.ts:137
The challenge method used to generate the code challenge
Remarks
While the RFC allows for the 'plain' value to be set, discord does not allow it
See
https://datatracker.ietf.org/doc/html/rfc7636#section-4.2
disableGuildSelect?
optionaldisableGuildSelect:boolean
Defined in: packages/utils/src/oauth2.ts:111
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?
optionalguildId:BigString
Defined in: packages/utils/src/oauth2.ts:104
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?
optionalintegrationType:DiscordApplicationIntegrationType
Defined in: packages/utils/src/oauth2.ts:122
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?
optionalpermissions: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"|"PIN_MESSAGES")[]
Defined in: packages/utils/src/oauth2.ts:97
The permissions of the invited bot
Remarks
Should be defined only in a bot authorization flow or with advanced bot authorization
prompt?
optionalprompt:"consent"|"none"
Defined in: packages/utils/src/oauth2.ts:90
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?
optionalredirectUri:string
Defined in: packages/utils/src/oauth2.ts:82
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?
optionalresponseType:"code"|"token"
Defined in: packages/utils/src/oauth2.ts:65
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:69
The scopes for the application
state?
optionalstate:string
Defined in: packages/utils/src/oauth2.ts:75
The optional state for security
See
https://discord.com/developers/docs/topics/oauth2#state-and-security