-
Notifications
You must be signed in to change notification settings - Fork 23
HowTo: Get Telegram API_ID & API_HASH
If you want to use the Pyrogram session in the MasterCryptoFarmBot, you need to get the API_ID
and API_HASH
from the Telegram API.
If you are using TgWebInitData, you don't need to get the API_ID
and API_HASH
.
Read More about Adding Accounts
Telegram API_ID
and API_HASH
are required to create a Pyrogram session. Telegram will provide you with the API_ID
and API_HASH
when you create a new application on the Telegram website. This is necessary to use the Telegram API.
-
🌐 Open the Telegram website: Open the Telegram website in your browser.
-
🔑 Log in to your Telegram account: Log in to your Telegram account using your phone number.
-
🔧 Access API development tools: Click on the
API development tools
link. -
➕ Create a new application: Click on the
Create application
button. -
📝 Fill out the form: Complete the form with the required details such as the application name, short name, and platform.
-
🔐 Get the API_ID and API_HASH: After creating the application, you will receive the
API_ID
andAPI_HASH
. Save these details in a safe place.
After getting the API_ID
and API_HASH
, you need to add them to the config.py
file in the MasterCryptoFarmBot
folder.
If you don't have the config.py
file, you can create one by copying the config.py.sample
file and renaming it to config.py
.
Don't remove the config.py.sample
file, it is required for the update process.
Open the config.py
file and edit the API_ID
and API_HASH
in the following format:
"telegram_api": {
"api_id": YOUR_API_ID,
"api_hash": "YOUR_API_HASH",
}
Replace YOUR_API_ID
and YOUR_API_HASH
with the API_ID
and API_HASH
you received from the Telegram website.
That's it! You have successfully obtained the API_ID
and API_HASH
from the Telegram API. You can now use them to create a Pyrogram session for the MasterCryptoFarmBot.
"telegram_api": {
"api_id": 1234567,
"api_hash": "0123456789abcdef0123456789abcdef",
}
❔ 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.