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
externalUserIdstringThe user ID in the application's own account system.
preferredGlobalNamestringAn optional preferred display name.
cancellationTokenCancellationTokenA 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.