Telegram Module setup
Last updated
Last updated
This documentation guides developers through the process of setting up a crypto wallet using Telegram and our module. By integrating the Telegram Login Widget and configuring it with the provided data-auth-url
, developers can create Ethereum wallets for their users linked to their Telegram IDs. The response from this process includes essential user details and an Ethereum address for further use.
Before proceeding, ensure that you have the following prerequisites:
A website or application where you want to implement the Telegram Login Widget.
The Telegram API Token for your bot (which you can obtain from the ).
Whitelist your website domain on the Bot settings.
The https://api.0xgasless.com/auth/telegram/callback
URL to configure the Telegram Login Widget.
In your website's HTML code, include the Telegram Login Widget with the following configuration:
Replace {your-bot-username}
with your bot's username.
Add a button or element to trigger the Telegram Login Widget. For example:
Make sure you have the Telegram widget script loaded before your code executes.
Capture the received data, including id
, username
, first_name
, last_name
, and ethAddress
. This information will be returned as JSON data.
Store this user data in your database or use it as needed for your application.