Telegram MTProto
طبقة TL 236عدد الطرق: 899OpenAPI 3.0.3

MTProto reference

bots.createBot

Create a managed bot » owned by the current user and controlled by the specified manager bot.

Create a [managed bot »](https://core.telegram.org/api/bots/managed-bots.md#creating-a-managed-bot) owned by the current user and controlled by the specified manager bot.

الاسمالنوعمطلوبالوصف
via_deeplinktrueلأSet only if the creation prompt was opened from a [managed bot creation request deep link »](https://core.telegram.org/api/links.md#managed-bot-creation-request-links)
namestringأيوهDisplay name of the bot, 1–64 characters
usernamestringأيوهUsername for the bot, as validated by [bots.checkUsername](https://core.telegram.org/method/bots.checkUsername.md)
manager_idInputUserأيوهThe manager bot that will control the created bot; must have the [user](https://core.telegram.org/constructor/user.md).`bot_can_manage_bots` flag set

الردود

User

MTProto RPC

  • 400 · BOT_CREATE_LIMIT_EXCEEDED — The current user already owns the maximum allowed number of owned bots, as specified by [bots_create_limit_default »](https://core.telegram.org/api/config.md#bots-create-limit-default) and [bots_create_limit_premium »](https://core.telegram.org/api/config.md#bots-create-limit-premium); if the current user doesn't have Telegram Premium, upgrading to Premium will allow them to create more bots.
  • 400 · MANAGER_INVALID — The specified manager bot is invalid.
  • 400 · MANAGER_PERMISSION_MISSING — The specified manager bot does not have the [user](https://core.telegram.org/constructor/user.md).bot_can_manage_bots flag set.
  • 400 · NAME_INVALID — The specified bot name is invalid.
  • 400 · USERNAME_INVALID — The provided username is not valid.
  • 400 · USERNAME_OCCUPIED — The provided username is already occupied.
  • 400 · USERNAME_SUFFIX_MISSING — The required bot suffix is missing from the passed username.

Telegram documentation ↗

Пользователи users.getFullUser
POST users.getFullUser

Получить подробный профиль пользователя

Возвращает расширенные сведения о пользователе. В ответе могут быть описание профиля и связанные пользователи или чаты.

ПользователиTL: users.getFullUserДоступен пользователям и ботам

Параметры запроса

Параметр
id
Тип
InputUser
Обязательный
Да
Описание
Пользователь, сведения о котором нужно получить.
Тип InputUser

Указывает пользователя для дальнейшего взаимодействия.

КонструкторПоляОписание
inputUseruser_id: longID пользователяaccess_hash: longЗначение access_hash из конструктора userУказывает пользователя для дальнейшего взаимодействия.
inputUserSelf—Текущий пользователь
inputUserFromMessagepeer: InputPeerЧат, в котором встретился пользовательmsg_id: intID сообщенияuser_id: longID пользователяПользователь с признаком min из конкретного сообщения чата
inputUserEmpty—Пустой конструктор, который не указывает пользователя

Авторизация Telegram

Сессия хранится в этой вкладке. Запрос выполняется напрямую к Telegram.