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
codestringThe authorization code to exchange.
cancellationTokenCancellationTokenA token used to cancel the operation.
Returns
- Task<DiscordAccessToken>
The exchanged Discord access token.