Releases: TeleDeveloperz/twa-sdk
Releases · TeleDeveloperz/twa-sdk
TypeScript SDK for Telegram Web Apps (TWA)
Installation
npm install @teledeveloperz/twa-sdkQuick Start
import { TWASDK } from "@teledeveloperz/twa-sdk";
// Initialize the SDK with the TWA init data
const sdk = new TWASDK(window.Telegram.WebApp.initData);
// Access user information
console.log(sdk.user.getFullName());
// Make API calls
sdk.getBotInfo().then(botInfo => {
console.log("Bot info:", botInfo);
});