Verification / OTP
TelegramGatewayNet
.NET SDK for the Telegram Gateway API
netstandard2.0net8.0net10.0
Features
- Send verification codes (OTP)
- Check send ability (free of charge)
- Check status and revoke a message
- Webhook delivery-report signature validation
- Unified GatewayResult<T> result type
Installation
dotnet add package TelegramGatewayNetQuick start
using TelegramGatewayNet;
using TelegramGatewayNet.Requests;
using var client = new TelegramGatewayClient("YOUR_GATEWAY_API_TOKEN");
var result = await client.SendVerificationMessageAsync(
new SendVerificationMessageRequest("+391234567890")
{
CodeLength = 6,
Ttl = 60,
CallbackUrl = "https://my.webhook/auth",
});
if (result.Ok)
Console.WriteLine(result.Value.RequestId);
else
Console.WriteLine($"Could not send: {result.Error}");Key methods
SendVerificationMessageAsyncSend a codeCheckSendAbilityAsyncCheck deliverabilityCheckVerificationStatusAsyncVerification statusRevokeVerificationMessageAsyncRevoke a messageREADMEgithub.com/ai-iskuzhin/TelegramGatewayNet
Loading README from the repository…