mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-12 09:02:24 +03:00
Mention how to get the API ID and Hash
parent
782c2b9633
commit
e94c614332
|
@ -1,4 +1,12 @@
|
||||||
The very first thing you want to do is to create a `TelegramClient`. This class will be your main interface with Telegram's API, and creating one is very simple:
|
Before working with Telegram's API, you need to get your own API ID and hash:
|
||||||
|
1. Follow [this link](https://my.telegram.org) and login with your phone number.
|
||||||
|
2. Click under *API Development tools*.
|
||||||
|
3. A *Create new application* window will appear. Fill in your application details. There is no need to enter any *URL*, and only the first two fields (*App title* and *Short name*) can be changed later as far as I'm aware.
|
||||||
|
4. Click on *Create application* at the end.
|
||||||
|
|
||||||
|
Remember that your **API hash is secret** and Telegram won't let you revoke it. Don't post it anywhere!
|
||||||
|
|
||||||
|
Once that's ready, the next step is to create a `TelegramClient`. This class will be your main interface with Telegram's API, and creating one is very simple:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from telethon import TelegramClient
|
from telethon import TelegramClient
|
||||||
|
|
Loading…
Reference in New Issue
Block a user