Search...

OAuth2API

export declare class OAuth2API 
export declare class OAuth2API 

No summary provided.

constructor(rest)

Constructs a new instance of the OAuth2API class
NameTypeOptionalDescription
restRESTNoNone

generateAuthorizationURL(options)

:

string

NameTypeOptionalDescription
optionsRESTOAuth2AuthorizationQueryNoThe options for creating the authorization URL

getCurrentAuthorizationInformation()

:

Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>

getCurrentBotApplicationInformation()

:

Promise<RESTGetAPIOAuth2CurrentApplicationResult>

getToken(options)

:

Promise<import("discord-api-types/v10").RESTOAuth2ImplicitAuthorizationURLFragmentResult>

Fetches the bearer token for the current application
Remarks
This is primarily used for testing purposes
NameTypeOptionalDescription
optionsRESTPostOAuth2ClientCredentialsURLEncodedDataNoThe options for the client credentials grant request

refreshToken(options)

:

Promise<RESTPostOAuth2AccessTokenResult>

NameTypeOptionalDescription
optionsRESTPostOAuth2RefreshTokenURLEncodedDataNoThe options for the refresh token request

tokenExchange(options)

:

Promise<RESTPostOAuth2AccessTokenResult>

NameTypeOptionalDescription
optionsRESTPostOAuth2AccessTokenURLEncodedDataNoThe options for the token exchange request