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
optionsRESTOAuth2AuthorizationQueryNo
The options for creating the authorization URL
getCurrentAuthorizationInformation(options?):Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>
NameTypeOptionalDescription
optionsPick<RequestData, 'signal'>Yes
The options for the current authorization information request
getCurrentBotApplicationInformation(options?):Promise<RESTGetAPIOAuth2CurrentApplicationResult>
NameTypeOptionalDescription
optionsPick<RequestData, 'signal'>Yes
The options for the current bot application information request
Fetches the bearer token for the current application
Remarks
This is primarily used for testing purposes
NameTypeOptionalDescription
bodyRESTPostOAuth2ClientCredentialsURLEncodedDataNo
The options for the client credentials grant request
optionsPick<RequestData, 'signal'>Yes
The options for the client credentials grant request
refreshToken(body, options?):Promise<RESTPostOAuth2AccessTokenResult>
NameTypeOptionalDescription
bodyRESTPostOAuth2RefreshTokenURLEncodedDataNo
The options for the refresh token request
optionsPick<RequestData, 'signal'>Yes
The options for the refresh token request
tokenExchange(body, options?):Promise<RESTPostOAuth2AccessTokenResult>
NameTypeOptionalDescription
bodyRESTPostOAuth2AccessTokenURLEncodedDataNo
The body of the token exchange request
optionsPick<RequestData, 'signal'>Yes
The options for the token exchange request