bots.updateStarRefProgram
Erstellen, bearbeiten oder löschen Sie das Partnerprogramm eines Bots, der uns gehört
Erstellen, bearbeiten oder löschen Sie das [Partnerprogramm](https://core.telegram.org/api/bots/referrals.md) eines Bots, der uns gehört
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
bot | InputUser | Ja | The bot |
commission_permille | int | Ja | The 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_months | int | Nein | Indicates the duration of the affiliate program; if not set, there is no expiration date. |
Antworten
StarRefProgram
MTProto RPC
- 400 · BOT_INVALID – Dies ist kein gültiger Bot.
- 400 · STARREF_AWAITING_END – Das vorherige Empfehlungsprogramm wurde vor weniger als 24 Stunden beendet: Weitere Änderungen können nach dem in userFull.starref_program.end_date angegebenen Datum vorgenommen werden.
- 400 · STARREF_PERMILLE_INVALID – Die angegebene commission_permille ist ungültig: Die Mindest- und Höchstwerte für diesen Parameter sind in den Client-Konfigurationsparametern [starref_min_commission_permille](https://core.telegram.org/api/config.md#starref-min-commission-permille) und [starref_max_commission_permille](https://core.telegram.org/api/config.md#starref-max-commission-permille)) enthalten.
- 400 · STARREF_PERMILLE_TOO_LOW – Der angegebene commission_permille ist zu niedrig: Die Mindest- und Höchstwerte für diesen Parameter sind in den Client-Konfigurationsparametern [starref_min_commission_permille](https://core.telegram.org/api/config.md#starref-min-commission-permille) und [starref_max_commission_permille](https://core.telegram.org/api/config.md#starref-max-commission-permille)) enthalten.