From e94c6143327adadaa4003b477c0c1e1b9fcfbbc5 Mon Sep 17 00:00:00 2001 From: Lonami Date: Sun, 10 Sep 2017 15:31:12 +0200 Subject: [PATCH] Mention how to get the API ID and Hash --- Creating-a-Client.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Creating-a-Client.md b/Creating-a-Client.md index 2a26f7a..251d63b 100644 --- a/Creating-a-Client.md +++ b/Creating-a-Client.md @@ -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 from telethon import TelegramClient