Official LessOTP SDKs: One Interface for Two Channels
Explore official LessOTP SDKs for JS/TS, PHP, Go, and Python: one auth interface for WhatsApp and Telegram, staging, and signed webhooks.

One Integration Pattern Across Four Languages
LessOTP ships official SDKs for JavaScript/TypeScript, PHP, Go, and Python so B2B SaaS teams do not need to rewrite HTTP clients, response parsing, and webhook verification for every stack.
The idea is simple: one authentication interface, two inbound channels. WhatsApp remains the backward-compatible default, while Telegram can be used through the same interface without changing your application architecture.
Official LessOTP Packages
| Language | Package | Install |
|---|---|---|
| JavaScript / TypeScript | @lessotp/sdk | npm install @lessotp/sdk |
| PHP | lessotp/sdk | composer require lessotp/sdk |
| Go | github.com/lessotp/sdk/go | go get github.com/lessotp/sdk/go |
| Python | lessotp-sdk | pip install lessotp-sdk |
Same Interface: Strict, Frictionless, WhatsApp, Telegram
Every SDK follows the same concept: a request with a phone number means Strict Mode, while a request without a phone number means Frictionless Mode. The channel can be `whatsapp` or `telegram`; if omitted, WhatsApp remains the default for legacy compatibility.
JS/TS Example
import { LessOTPClient, parseVerifiedWebhook } from "@lessotp/sdk";
const client = new LessOTPClient({ apiKey: process.env.LESSOTP_API_KEY! });
await client.authRequest("6281234567890"); // WhatsApp strict
await client.authRequest(); // WhatsApp frictionless
await client.requestAuth({ channel: "telegram", phoneNumber: "6281234567890" });
await client.requestAuth({ channel: "telegram" }); // Telegram frictionless
const event = await parseVerifiedWebhook(rawBody, signature, webhookSecret);The Same Pattern in PHP, Go, and Python
PHP
$client->authRequest('6281234567890'); // WhatsApp strict
$client->authRequest(); // WhatsApp frictionless
$client->requestTelegramAuth('6281234567890');
$client->requestAuth(VerificationChannel::telegram());Go
client.AuthRequest(ctx, &phone) // WhatsApp strict
client.AuthRequest(ctx, nil) // WhatsApp frictionless
client.RequestTelegramAuth(ctx, &phone)
client.RequestTelegramAuth(ctx, nil)Python
client.auth_request("6281234567890") # WhatsApp strict
client.auth_request() # WhatsApp frictionless
client.request_telegram_auth("6281234567890")
client.request_auth(channel="telegram")Webhook Verification Included
Official SDKs also include HMAC helpers for validating LessOTP's `X-Signature` webhook header. This keeps account provisioning secure and consistent across languages.
- Verify signatures from the raw request body.
- Parse `verification.success` payloads into a consistent structure.
- Support channel, mode, phone_number, and Telegram metadata when present.
- Remain compatible with older WhatsApp payloads that do not include the channel field.
Start from the SDK, not a blank HTTP client
Pick your team's language, install the official LessOTP SDK, then test WhatsApp and Telegram in staging before production.
Open SDK Documentation