Telegram MTProto
TL layer 236899 methodsOpenAPI 3.0.3

MTProto guide

bots.updateStarRefProgram

Create, edit or delete the affiliate program of a bot we own

Create, edit or delete the [affiliate program](https://core.telegram.org/api/bots/referrals.md) of a bot we own

NameTypeRequiredDescription
botInputUserYesThe bot
commission_permilleintYesThe permille commission rate: it indicates the share of Telegram Stars received by affiliates for every transaction made by users they referred inside of the bot. The minimum and maximum values for this parameter are contained in the [starref_min_commission_permille](https://core.telegram.org/api/config.md#starref-min-commission-permille) and [starref_max_commission_permille](https://core.telegram.org/api/config.md#starref-max-commission-permille) client configuration parameters. Can be `0` to terminate the affiliate program. Both the duration and the commission may only be raised after creation of the program: to lower them, the program must first be terminated and a new one created.
duration_monthsintNoIndicates the duration of the affiliate program; if not set, there is no expiration date.

Replies

StarRefProgram

MTProto RPC

  • 400 · BOT_INVALID — This is not a valid bot.
  • 400 · STARREF_AWAITING_END — The previous referral program was terminated less than 24 hours ago: further changes can be made after the date specified in userFull.starref_program.end_date.
  • 400 · STARREF_PERMILLE_INVALID — The specified commission_permille is invalid: the minimum and maximum values for this parameter are contained in the [starref_min_commission_permille](https://core.telegram.org/api/config.md#starref-min-commission-permille) and [starref_max_commission_permille](https://core.telegram.org/api/config.md#starref-max-commission-permille) client configuration parameters.
  • 400 · STARREF_PERMILLE_TOO_LOW — The specified commission_permille is too low: the minimum and maximum values for this parameter are contained in the [starref_min_commission_permille](https://core.telegram.org/api/config.md#starref-min-commission-permille) and [starref_max_commission_permille](https://core.telegram.org/api/config.md#starref-max-commission-permille) client configuration parameters.

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.