This guide will walk you through setting up your Telegram Mini-app or game using Sequence’s Unity SDK, enabling web3 functionality on EVM chains for your users, for email and guest authentication methods. We’ll develop the game logic in Unity, but to deploy it as a Telegram Mini-Game, we’ll package the WebGL build within a React project.Documentation Index
Fetch the complete documentation index at: https://sequence-0fb8d9e6-unreal-quickstart-with-marketplace.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Setup your Telegram Bot
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’)
Prepare your Unity WebGL Project
Install Sequence's Unity SDK
Use one of our recommend installation options for your existing project or use our
Unity Boilerplate if you want to start a project from scratch.
UI for Mobile Layouts
Ensure that your game’s UI is optimized for mobile aspect ratios. We recommend using the
Device Simulator for Unity.
Additionally, ensure your input handling is set up for touch controls.
Configure Sequence's React Template for WebGL
Sequence’s Unity SDK includes a WebGL Template for exporting as a React project.
Copy the
WebGLTemplates folder from Packages/Sequence Embedded Wallet SDK/ into your project’s Assets/ directory.
Go to Project Settings -> Player -> WebGL -> Resolution and Presentation and select the SequenceReact template.Cloudflare Configuration
Inside the React project’s root directory, create a
wrangler.toml file and include the following content.Deploy your Telegram Mini-Game
Authenticate with Cloudflare Account
From the React project’s root directory, 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 Sequence Builder that your wallet configuration includes the URL of your deployed application
as an allowed origin.