class OAuth2API

export declare class OAuth2API

Constructors

constructor(
rest: REST
)

Constructs a new instance of the OAuth2API class

generateAuthorizationURL() : string

Creates an OAuth2 authorization URL given the options

See also: https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-authorization-url-example

getCurrentAuthorizationInformation(
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>

Fetches the current authorization information

See also: https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information

getCurrentBotApplicationInformation(
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIOAuth2CurrentApplicationResult>

Fetches the current bot's application information

See also: https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information