Personal Telegram account connection
Important to know
Restrictions based on the usage scenario can be applied when using an account. Exact data is not available, but approximate limit values can be found in open sources.
LIMITATIONS & RECOMMENDATIONS
You can add any number of contacts during the first synchronization on a new Telegram account (just registered).
Existing accounts have a limit of 200 contacts.
For a new account where contacts have been added before, the limit is 200.
If you exceed the 200-contact limit, you can still add up to 15 contacts manually per day.
To avoid further restrictions, add contacts gradually throughout the day. Adding too many at once (e.g., 15 in 5-10 minutes) will trigger stricter daily limits: 5 contacts the next day, and eventually just 1 contact per day if the lower limit is also exceeded.
If you add 15 contacts throughout the day, no limits will be set the next day.
The daily limit is 40 messages to different chats, after which your account will be temporarily restricted.
Getting started
To connect your account, first get your api_id and api_hash. Go to https://my.telegram.org and log into your account.

After logging in, proceed to the "API development tools" section.

Then fill in the fields:

The "App title" field must be filled without spaces or any symbols, using only letters (no underscores, commas, etc.).
The "Short name" field must be filled without spaces or any symbols, using only letters and numbers (no underscores, commas, periods, dashes, hyphens, etc.).
The "URL" field is a valid link to your website.
Choose "WEB" in the "Platform".
The description should be in Latin.
Then click Create application.
The [object Object] error on my.telegram.org means there is invalid data. Ensure all fields are correct and that your 'app title' and 'short name' are not already taken.
If you have filled out everything correctly, you will see the following data:

Account connection
Select "Telegram Account" in the "Messengers" section, then enter your phone number and the obtained credentials (api_id and api_hash).

Click "Get code":

A verification code will be sent to your Telegram account. Enter it:

If two-factor authentication (2FA) is enabled on your account, you will also need to enter your password.
Group chats
To allow the bot to reply in group chats, set the client variable answer_on_group_chat = "1". By default, this feature is disabled.
Chat archive
Archived chats are excluded from processing.
Starting a chat using a phone number
To start a dialog with a new client, go to the "Clients" section and click "Write in Telegram".

Enter the client's phone number and name in the displayed window, and confirm by clicking "Add".

If the new client has configured his Telegram privacy settings to permit discovery by phone number, a new client record will be generated.
Client import from file
You can import clients from a file. To do this, click Upload a list of clients in the Messengers section of the desired bot.

Once the import is finished, client profiles will be generated for those who can be added to contacts based on their phone number.
PLEASE NOTE!
Consider the restrictions for Telegram account contact creation. Learn more in the Important to know section.
Calculator methods
create_telegram_client(phone, name, group) - adds the specified number to the contacts in the Telegram account and creates a corresponding client in MaviBot.
phone - client's phone
name - client's name
group - target bot user ID for bot linking.
The calculator also supports common/general methods.
Last updated