Skip to content

DiscordOAuthClientOptions

Defined in: oauth/oauth.type.ts:2

Options for createDiscordOAuthClient.

optional authorizeUrl?: string

Defined in: oauth/oauth.type.ts:12

Override the authorize page for testing. Defaults to https://discord.com/oauth2/authorize.


optional baseUrl?: string

Defined in: oauth/oauth.type.ts:10

Override the API base for testing. Defaults to https://discord.com/api/v10.


clientId: string

Defined in: oauth/oauth.type.ts:4

The application’s client id (the same as its application id). Not a secret.


clientSecret: string

Defined in: oauth/oauth.type.ts:6

The application’s client secret, from the developer portal (OAuth2 → Reset Secret).


optional fetch?: (input, init?) => Promise<Response>

Defined in: oauth/oauth.type.ts:14

Override fetch for testing. Defaults to globalThis.fetch.

string | URL | Request

RequestInit

Promise<Response>


redirectUri: string

Defined in: oauth/oauth.type.ts:8

One of the redirect URIs registered on the application; Discord refuses any other.


optional timeoutMs?: number

Defined in: oauth/oauth.type.ts:16

Per-request deadline in milliseconds. Defaults to 15000.