Overview
Portex SDK is a development kit for creating mini-games on telegram, web and other platforms.
Portex SDK (beta)
Install
- inline - https://sdk.portex.app/portex-sdk.min.jsto your mini-game
- or build from source code 
git clone https://github.com/portex-app/portex-sdk.git
cd portex-sdk
pnpm install
pnpm buildUsage
Note: this is a beta version, you can only use it in telegram. get app-id from Portex CLI
- initialize Portex SDK with your app-id 
const portex = new Portex({
	appId: 'your-app-id',
})
try {
	const result = await portex.init()
	if (result.status === 'ok') {
		// init success
		// get user info
		consle.log(sdk.webApp.initDataUnsafe)
	} else {
		// init failed
	}
} catch (error) {
	console.error(error)
}- SDK Demo: https://t.me/portex_app_bot?startapp 
SDK Features
- ads (coming soon) 
API Reference
Source
Not found
Last updated

