This guide will walk you through setting up Web SDK with your Telegram Mini-app or Game, enabling web3 functionality on EVM chains for your users for email and guest authentication methods.Documentation Index
Fetch the complete documentation index at: https://docs.sequence.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before starting, ensure you have:- A Telegram account
- Account and Access to Cloudflare Dashboard
Integration Steps
Create a Telegram Bot with BotFather
- Open Telegram and search for “@BotFather”
- Start a conversation by clicking “Start” or typing
/start - Create a new bot by typing
/newbot - Follow the prompts:
- Enter a name for your bot
- Choose a username (must end in ‘bot’)
Obtain Required Tokens
After creating your bot, BotFather will provide:
- Bot Token (HTTP API Token)
- Bot Username
Install and Configure Your Project
- Clone the Sequence Telegram starter:
- Copy the example files in your project root:
.env file with the VITE_PROJECT_ACCESS_KEY and VITE_WAAS_CONFIG_KEY with your keys from Sequence Builder after configuration.- Install dependencies:
- Build the app:
- Update the
VARSin thewrangler.tomlfile with a user provided secret forBOT_SECRETand the bot token from BotFather forBOT_TOKEN.
Authenticate with Cloudflare Account
Deploy the app and functions logic to Cloudflare
- Run
pnpm wrangler pages deploy
Register Webhook with Telegram
Now we call our
registerWebhook endpoint on our app to register the webhook function with the URL of your deployed application to enable access for the Telegram API.Update Allowed Origins
Ensure in your wallet configuration you have added the URL of your deployed application as an allowed origin through the configuration page on Sequence Builder.
Going to production
For yourBOT_TOKEN, you can encrypt and store it in Cloudflare via the following command to prevent data leaks: