export declare class OAuth2API
generateAuthorizationURLoptions: RESTOAuth2AuthorizationQuery) : string (
options: RESTOAuth2AuthorizationQuery
Creates an OAuth2 authorization URL given the options
See also: https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-authorization-url-example
getCurrentAuthorizationInformationoptions?: Pick<RequestData, 'signal'>) : Promise<RESTGetAPIOAuth2CurrentAuthorizationResult> (
options?: Pick<RequestData, 'signal'>
Fetches the current authorization information
See also: https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information
getCurrentBotApplicationInformationoptions?: Pick<RequestData, 'signal'>) : Promise<RESTGetAPIOAuth2CurrentApplicationResult> (
options?: Pick<RequestData, 'signal'>
Fetches the current bot's application information
See also: https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
getTokenoptions?: Pick<RequestData, 'signal'>) : Promise<RESTOAuth2ImplicitAuthorizationURLFragmentResult> (
options?: Pick<RequestData, 'signal'>
Fetches the bearer token for the current application
See also: https://discord.com/developers/docs/topics/oauth2#client-credentials-grant
refreshTokenoptions?: Pick<RequestData, 'signal'>) : Promise<RESTPostOAuth2AccessTokenResult> (
options?: Pick<RequestData, 'signal'>
Refreshes an OAuth2 access token, giving you a new one
tokenExchangeoptions?: Pick<RequestData, 'signal'>) : Promise<RESTPostOAuth2AccessTokenResult> (
options?: Pick<RequestData, 'signal'>
Performs an OAuth2 token exchange, giving you an access token