Layer 227
BotsExportBotToken
Export the bot token of a managed bot; can only be called by the manager bot.
method
Bots
bots.exportBotToken#bd0d99eb bot:InputUser revoke:Bool = bots.ExportedBotToken;
Parameters
| Name | Type | Description |
|---|---|---|
| Bot | InputUser | The managed bot to export the token for |
| Revoke | Bool | If bool True, revoke the current token and generate a new one |
Returns
bots.ExportedBotTokenGogram Example
// BotsExportBotToken - positional arguments result, err := client.BotsExportBotToken(&tg.InputUserSelf{}, true) if err != nil { // handle error } // result is *tg.BotsExportedBotToken
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |