Skip to main content

DiscordAccessTokenResponse

@discordeno/bot


Documentation / @discordeno/bot / DiscordAccessTokenResponse

Interface: DiscordAccessTokenResponse

Defined in: packages/types/dist/types/discord/oauth2.d.ts:143

https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response

Properties

access_token

access_token: string

Defined in: packages/types/dist/types/discord/oauth2.d.ts:145

The access token of the user


expires_in

expires_in: number

Defined in: packages/types/dist/types/discord/oauth2.d.ts:149

The number of seconds after that the access token is expired


guild?

optional guild: DiscordGuild

Defined in: packages/types/dist/types/discord/oauth2.d.ts:162

The guild the bot has been added. Requires the bot scope


refresh_token

refresh_token: string

Defined in: packages/types/dist/types/discord/oauth2.d.ts:156

The refresh token to refresh the access token

Remarks

When the token exchange is a client credentials type grant this value is not defined.


scope

scope: string

Defined in: packages/types/dist/types/discord/oauth2.d.ts:158

The scopes for the access token


token_type

token_type: string

Defined in: packages/types/dist/types/discord/oauth2.d.ts:147

The type of token


webhook?

optional webhook: DiscordIncomingWebhook

Defined in: packages/types/dist/types/discord/oauth2.d.ts:160

The webhook the user created for the application. Requires the webhook.incoming scope