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(options?):Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>
NameTypeOptionalDescription
optionsPick<RequestData, 'signal'>YesThe options for the current authorization information request
getCurrentBotApplicationInformation(options?):Promise<RESTGetAPIOAuth2CurrentApplicationResult>
NameTypeOptionalDescription
optionsPick<RequestData, 'signal'>YesThe 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
bodyRESTPostOAuth2ClientCredentialsURLEncodedDataNoThe options for the client credentials grant request
optionsPick<RequestData, 'signal'>YesThe options for the client credentials grant request
refreshToken(body, options?):Promise<RESTPostOAuth2AccessTokenResult>
NameTypeOptionalDescription
bodyRESTPostOAuth2RefreshTokenURLEncodedDataNoThe options for the refresh token request
optionsPick<RequestData, 'signal'>YesThe options for the refresh token request
revokeToken(applicationId, applicationSecret, body, options?):Promise<void>
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id
applicationSecretstringNoThe application secret
bodyRESTPostOAuth2TokenRevocationQueryNoThe body of the token revocation request
optionsPick<RequestData, 'signal'>YesThe options for the token revocation request
tokenExchange(body, options?):Promise<RESTPostOAuth2AccessTokenResult>
NameTypeOptionalDescription
bodyRESTPostOAuth2AccessTokenURLEncodedDataNoThe body of the token exchange request
optionsPick<RequestData, 'signal'>YesThe options for the token exchange request