-
Notifications
You must be signed in to change notification settings - Fork 20
How to: Add New Accounts
You can add new accounts to your MasterCryptoFarmBot using two methods:
Using Pyrogram Sessions or Using TgWebAppInitData or WebQuery for Modules.
Pyrogram is a Python client for the Telegram API. Pyrogram is like a Telegram client, but it's a library that you can use to interact with Telegram's API. It's a powerful tool that allows you to create bots, automate tasks, and much more.
π’ Pros:
- β One-time login for all bot modules.
- β More access to your account.
- β Modules can join channels for tasks.
- β Change names if needed for tasks.
- β Easier to use.
π΄ Cons:
- You need to get Telegram
API_ID
andAPI_HASH
. - There will be a session in your Telegram account.
- Full access to your account. If you don't trust the bot or you want to install modules from unknown sources, it's better to use the Web Query method.
-
First of all, you need to get Telegram
API_ID
andAPI_HASH
, If you don't know how to get them to read this article: HowTo: Get Telegram API_ID & API_HASH, Then you need to open yourconfig.py
file and replace defaultAPI_ID
&API_HASH
values with yours. -
Navigate to your MasterCryptoFarmBot directory, then run
python add_account.py
on Windows orpython3 add_account.py
on Linux.
π‘ποΈ Note: After adding the account, you need to enable it in the control panel to use it in the modules. Make sure to add a User-Agent to the account in the control panel before enabling it.
Then you will have 2 options:
- You will be asked to enter a session name. You can enter a valid (a-zA-Z0-9) session name of your choice or, to keep it simple, just enter your account's Telegram ID. Session names will be stored locally and can be anything as long as they are not duplicated with another session name!
- Enter the phone number with the country code, for example:
+12345678900
or+989123456789
. - At this point, Pyrogram will be called and the rest will be handled by Pyrogram. You will have to enter the received code from Telegram and the 2FA password (if you've enabled 2FA).
- Upon successful registration, the application will notify you that the session was created successfully and provide basic info about the session, like user ID, name, username, phone number, and session name.
If you already have Pyrogram .session
files, you need to import them again as we store the data locally inside accounts.json
. Simply move your session files to the /telegram_accounts
directory and select this option. The application will check them for validity and notify you if the import was successful or not.
This is needed to attach some important data like user_agent, proxy, and activation status (should the account be used in modules?) to the session.
In this wiki, to simplify things I'll use "TgData" instead of "TgWebAppInitData".
This method is used to add accounts to the MasterCryptoFarmBot for a specific module using the TgData
of the Telegram Web Application. This method is useful when you don't want to use Pyrogram sessions or you don't have access to the phone number of the account you want to add.
π‘ This method is not recommended for users who want to use several accounts with different modules.
π΄ You might need to periodically change TgData, as it includes a Time of generation, some apps might invalidate (and give an error) if you are using old TgDataor use it as a Bot Detection factor to ban your accounts before listings.
π’ Pros:
- β
No need to get
API_ID
andAPI_HASH
. - β No session in your Telegram account.
- β More secure than Pyrogram sessions for some users.
- β No need to use a phone number to add the account.
π΄ Cons:
- You need to get
TgData
which could be hard for some users. - You need to get
TgData
for each module you want to add the account to. - It's hard to add if you have a lot of accounts and modules.
- No full control over your account.
- You can't join channels for tasks.
- You can't change names if needed for tasks.
First, you need to Install A Module, Then go to your MasterCryptoFarm Dashboard, click on Manage Bot Modules, Click on the accounts icon as shown in the screenshot below:
πΈ Screenshot
Then click on Add module account button, and fill in the following fields:
- Session name: a unique name for your sessions, just shown to you and visible to modules themselves (not to bots like Blum)
- Web App URL: The
TgData
that you obtained. How To Obtain TgData - User Agent: How to get UserAgent
- Proxy: Proxy guide
There are several ways to obtain Telegram WebApplication Initial Data, which is used to authorize bots using your Telegram accounts.
-
Open Telegram Desktop and head to Settings > Advanced > Experimental Settings > Enable WebView Inspecting.
-
Open your desired bot's application (Hit Play / Launch Button), then open the developer tools (F12) and go to the Console tab.
-
Paste the following code in the console and hit enter:
copy(Telegram.WebApp.initData);
-
TgData is now copied to your clipboard.
- Open your desired bot's application (Hit Play / Launch Button).
- Once it's loaded, turn off your device's Wi-Fi and mobile data, then refresh the page. You can find the refresh button in the top right corner of the screen.
- You should see a "Webpage not available" message. Copy the FULL URL that includes
#tgWebAppData
.
-
Open Telegram Web and head to your desired bot's application (Hit Play / Launch Button).
-
Press F12 to open developer tools, then go to the Console tab.
-
Paste the following code in the console and hit enter:
copy(document.querySelector("iframe")?.src || "No iframe found.");
-
TgData is now copied to your clipboard.
https://major.glados.app/#tgWebAppData%3Dquery_id%3DREDACTED%26user%3D%7B%22id%22%3AREDACTED%2C%22first_name%22%3A%22REDACTED%22%2C%22last_name%22%3A%22%22%2C%22username%22%3A%22REDACTED%22%2C%22language_code%22%3A%22en%22%2C%22is_premium%22%3Atrue%2C%22allows_write_to_pm%22%3Atrue%7D%26auth_date%3DREDACTED%26hash%3DREDACTED%26tgWebAppVersion%3D7.8%26tgWebAppPlatform%3Dweba%26tgWebAppBotInline%3D1%26tgWebAppThemeParams%3D%7B%22bg_color%22%3A%22%23212121%22%2C%22text_color%22%3A%22%23ffffff%22%2C%22hint_color%22%3A%22%23aaaaaa%22%2C%22link_color%22%3A%22%238774e1%22%2C%22button_color%22%3A%22%238774e1%22%2C%22button_text_color%22%3A%22%23ffffff%22%2C%22secondary_bg_color%22%3A%22%230f0f0f%22%2C%22header_bg_color%22%3A%22%23212121%22%2C%22accent_text_color%22%3A%22%238774e1%22%2C%22section_bg_color%22%3A%22%23212121%22%2C%22section_header_text_color%22%3A%22%23aaaaaa%22%2C%22subtitle_text_color%22%3A%22%23aaaaaa%22%2C%22destructive_text_color%22%3A%22%23e53935%22%7D
OR - (both will work)
#tgWebAppData%3Dquery_id%3DREDACTED%26user%3D%7B%22id%22%3AREDACTED%2C%22first_name%22%3A%22REDACTED%22%2C%22last_name%22%3A%22%22%2C%22username%22%3A%22REDACTED%22%2C%22language_code%22%3A%22en%22%2C%22is_premium%22%3Atrue%2C%22allows_write_to_pm%22%3Atrue%7D%26auth_date%3DREDACTED%26hash%3DREDACTED%26tgWebAppVersion%3D7.8%26tgWebAppPlatform%3Dweba%26tgWebAppBotInline%3D1%26tgWebAppThemeParams%3D%7B%22bg_color%22%3A%22%23212121%22%2C%22text_color%22%3A%22%23ffffff%22%2C%22hint_color%22%3A%22%23aaaaaa%22%2C%22link_color%22%3A%22%238774e1%22%2C%22button_color%22%3A%22%238774e1%22%2C%22button_text_color%22%3A%22%23ffffff%22%2C%22secondary_bg_color%22%3A%22%230f0f0f%22%2C%22header_bg_color%22%3A%22%23212121%22%2C%22accent_text_color%22%3A%22%238774e1%22%2C%22section_bg_color%22%3A%22%23212121%22%2C%22section_header_text_color%22%3A%22%23aaaaaa%22%2C%22subtitle_text_color%22%3A%22%23aaaaaa%22%2C%22destructive_text_color%22%3A%22%23e53935%22%7D
So basically, copy the whole URL or just #tgWebAppData
to the end.
β If you have a question, idea, or suggestion, You can create new discussion in the Discussions
π If you encounter a bug or issue, please create a new issue in the Issues section.
For more information and updates, join our π’ Telegram Channel or join our π¬ Telegram Group for discussion and support.