Table of Contents
API reference

Method GetProvisionalTokenAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetProvisionalTokenAsync(string, string?, CancellationToken)

Creates or retrieves a provisional account token using the bot token.

public Task<DiscordProvisionalToken> GetProvisionalTokenAsync(string externalUserId, string? preferredGlobalName = null, CancellationToken cancellationToken = default)

Parameters

externalUserId string

The user ID in the application's own account system.

preferredGlobalName string

An optional preferred display name.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<DiscordProvisionalToken>

The issued provisional token; no refresh token is guaranteed.

Remarks

Keep the bot token on a trusted backend. The returned access and identity tokens are secrets and must not be logged.