What to do when connecting a personal Telegram channel
An illustrated admin guide to obtaining API credentials, configuring MTProto in ChatHub and connecting a personal Telegram account.
Before you start#
For admins configuring personal Telegram accounts through MTProto. This guide covers the shared Telegram application credentials and the separate account sign-in needed to receive and reply to messages in ChatHub.
- 1
Use a ChatHub account with access to Settings → Channels and channel management.
- 2
Have an active Telegram account and access to the Telegram app for login codes. Prepare your two-step verification password if enabled.
- 3
Prepare the API ID and API Hash from the same Telegram application, or obtain them below.
1. Open Settings → Channels#
- 1
Open Quản trị (Administration) → Cài đặt (Settings) in ChatHub.
- 2
Select Kênh (Channels) in the left column, or open /settings?tab=channels on your ChatHub domain.
- 3
Find Telegram cá nhân (MTProto). The form contains API ID, API Hash and the Lưu (Save) button.
2. Obtain your Telegram API credentials#
- 1
Enter your Telegram phone number in international format, starting with + and the country code, in Your Phone Number, then select Next.
- 2
Find the login code in your Telegram app and enter it on my.telegram.org. This site sends its code through Telegram, not SMS.
After signing in, Your Telegram Core shows three options. Select API development tools to open your application details, as shown below.
If your account already has an application, Telegram opens App configuration directly. Otherwise, complete Telegram’s application form to obtain an API ID and API Hash. The screenshot below shows an existing application.
- 1
Copy the value next to App api_id (position 1) and paste it into API ID in ChatHub.
- 2
Copy the value next to App api_hash (position 2) on the same page and paste it into API Hash in ChatHub.
- 3
App title and Short name are application names, not connection credentials. Do not use them in place of API ID/API Hash.
- 4
Only copy the two API values at the top. There is no need to edit FCM credentials, WNS credentials or Available MTProto servers, or select Save changes in Telegram, when retrieving credentials for an existing application. Continue with Save in ChatHub in step 3 below.
3. Enter and save the credentials#
- 1
Return to Settings → Channels → Telegram cá nhân (MTProto).
- 2
Paste App api_id into API ID. It must be a positive integer, not an API Hash or bot token.
- 3
Paste App api_hash into API Hash. Both fields are required for the first configuration.
- 4
Select Lưu (Save). On success, ChatHub tells you the settings were saved and asks you to reconnect the personal Telegram account on the Channels page.
The hash is encrypted before storage. These settings override the TELEGRAM_API_ID/TELEGRAM_API_HASH environment variables and apply immediately without restarting.
Configured means an API Hash has been stored. It does not prove the credential pair works or that a Telegram account is connected; complete account sign-in next.
4. Connect a personal Telegram account#
- 1
Open Quản trị → Kênh (Administration → Channels), at /channels. This account management page is separate from the Channels tab in Settings.
- 2
For a new channel account, select Thêm tài khoản (Add account) → Telegram cá nhân (Personal Telegram, Phone number) → Tạo tài khoản (Create account).
- 3
For an existing channel account, open Mở cấu hình (Open configuration) on its card and find Đăng nhập Telegram (Telegram sign-in). Avoid creating a duplicate channel account.
- 1
Enter the account’s phone number in Số điện thoại. Include + and the country code for foreign numbers; ChatHub also normalizes local numbers.
- 2
Select Gửi mã xác thực (Send verification code). Check Telegram, enter the code in Mã xác thực and select Xác nhận mã (Confirm code). Follow the delivery method shown by ChatHub.
- 3
If prompted, enter Mật khẩu hai bước (Two-step verification password) and select Xác nhận mật khẩu (Confirm password). This is the Telegram account password, not API Hash.
- 4
Wait for the successful account connection message or Đã kết nối (Connected) status. Keep your login code private.
5. Verify and troubleshoot#
- 1
Confirm account sign-in succeeded and the channel is enabled. Saving API credentials alone does not start receiving messages.
- 2
If group messages are needed, check Đồng bộ tin nhắn nhóm (Sync group messages) in the account settings. Turning it off stops new group messages while direct messages still arrive.
- 3
Send a test message from another account, open Tin nhắn (Inbox) in ChatHub and try replying.
Invalid API ID: use the positive integer from App api_id. Missing API Hash on first setup: enter App api_hash and save again. The form checks both conditions.
Saved but unable to sign in: verify that the ID and Hash belong to the same application, save them and reconnect from Channels. Read the specific error before retrying.
No code received: check the Telegram app for my.telegram.org; for ChatHub, verify the phone number and delivery method displayed. Use Gửi lại mã (Resend code) when available. If prompted for two-step verification, enter the Telegram password.