Skip to main content

DiscordAccessTokenResponse

Documentation


Documentation / @discordeno/types / DiscordAccessTokenResponse

Interface: DiscordAccessTokenResponse

Defined in: discord/oauth2.ts:150

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

Properties

access_token

access_token: string

Defined in: discord/oauth2.ts:152

The access token of the user


expires_in

expires_in: number

Defined in: discord/oauth2.ts:156

The number of seconds after that the access token is expired


guild?

optional guild?: DiscordGuild

Defined in: discord/oauth2.ts:169

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


refresh_token

refresh_token: string

Defined in: discord/oauth2.ts:163

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: discord/oauth2.ts:165

The scopes for the access token


token_type

token_type: string

Defined in: discord/oauth2.ts:154

The type of token


webhook?

optional webhook?: DiscordWebhook

Defined in: discord/oauth2.ts:167

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