DiscordOAuthClientOptions
Defined in: oauth/oauth.type.ts:2
Options for createDiscordOAuthClient.
Properties
Section titled “Properties”authorizeUrl?
Section titled “authorizeUrl?”
optionalauthorizeUrl?:string
Defined in: oauth/oauth.type.ts:12
Override the authorize page for testing. Defaults to https://discord.com/oauth2/authorize.
baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: oauth/oauth.type.ts:10
Override the API base for testing. Defaults to https://discord.com/api/v10.
clientId
Section titled “clientId”clientId:
string
Defined in: oauth/oauth.type.ts:4
The application’s client id (the same as its application id). Not a secret.
clientSecret
Section titled “clientSecret”clientSecret:
string
Defined in: oauth/oauth.type.ts:6
The application’s client secret, from the developer portal (OAuth2 → Reset Secret).
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Defined in: oauth/oauth.type.ts:14
Override fetch for testing. Defaults to globalThis.fetch.
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
redirectUri
Section titled “redirectUri”redirectUri:
string
Defined in: oauth/oauth.type.ts:8
One of the redirect URIs registered on the application; Discord refuses any other.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: oauth/oauth.type.ts:16
Per-request deadline in milliseconds. Defaults to 15000.