Table of Contents
API reference

Method ExchangeAccessTokenAsync

Namespace
DisCatSharp.Hosting.AspNetCore.Ingress.OAuth
Assembly
DisCatSharp.Hosting.AspNetCore.dll

ExchangeAccessTokenAsync(string, CancellationToken)

Exchanges the specified authorization code for a Discord access token.

Task<DiscordAccessToken> ExchangeAccessTokenAsync(string code, CancellationToken cancellationToken = default)

Parameters

code string

The authorization code to exchange.

cancellationToken CancellationToken

A token used to cancel the operation.

Returns

Task<DiscordAccessToken>

The exchanged Discord access token.