Skip to content

Releases: TeleDeveloperz/twa-sdk

TypeScript SDK for Telegram Web Apps (TWA)

21 Sep 04:58
2fc5406

Choose a tag to compare

Installation

npm install @teledeveloperz/twa-sdk

Quick 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);
});