Looking to build a Telegram trading bot without a web or mobile app to start? View our overall
Telegram trading bot guide to learn how to set up your bot for different
configurations.
1
Instrument your app with Privy
If you have not already done so, instrument your web app with Privy’s React SDK or your mobile app with Privy’s React Native SDK and enable Telegram login.
2
Create wallets for your users
When your users login to your app with Telegram or link a Telegram account, create a wallet for them. Store a mapping between the ID of the created wallet and the user’s Telegram ID so that you can determine the user’s wallet within the bot’s code.
3
Add a session signer to the user's wallet
After the wallet has been created, add a session signer to the user’s wallet, which the bot can use to transact on the user’s behalf.Make sure to store the private key(s) associated with your signer ID securely in your server. Your Telegram bot or agent will need this to execute transaction requests.Follow the linked quickstart below to learn how to add a session signer to the user’s wallet.
4
Execute actions with your signer
Finally, the bot can use the session signer to execute transactions on the user’s behalf when prompted. For instance, you might implement a
/transact
command that takes input on the user to transact on their behalf.Make sure to configure your Privy client with the private key for the session signer (authorization key) you created in the Dashboard.