Skip to content

Telegram 凭据#

¥Telegram credentials

你可以使用以下凭据验证以下节点:

¥You can use these credentials to authenticate the following nodes:

¥Telegram Trigger

先决条件#

¥Prerequisites

创建 Telegram 账户。

¥Create a Telegram account.

支持的身份验证方法#

¥Supported authentication methods

  • API 机器人访问令牌

¥API bot access token

相关资源#

¥Related resources

有关服务的更多信息,请参阅 Telegram 机器人 API 文档

¥Refer to Telegram's Bot API documentation for more information about the service.

请参阅 Telegram 机器人功能 文档,了解有关创建和使用机器人的更多信息。

¥Refer to the Telegram Bot Features documentation for more information on creating and working with bots.

使用 API 机器人访问令牌#

¥Using API bot access token

要配置此凭据,你需要:

¥To configure this credential, you'll need:

  • 机器人访问令牌

¥A bot Access Token

生成访问令牌:

¥To generate your access token:

  1. BotFather 开始聊天。

¥Start a chat with the BotFather. 2. 输入用于创建新机器人的 /newbot 命令。

¥Enter the /newbot command to create a new bot. 3. BotFather 会要求你为新机器人输入名称和用户名:

¥The BotFather will ask you for a name and username for your new bot:

  • 名称是机器人显示在联系方式和其他位置的名称。你可以稍后更改机器人名称。

    ¥The name is the bot's name displayed in contact details and elsewhere. You can change the bot name later.

  • 用户名是用于搜索、提及和 t.me 链接的简短名称。创建用户名时请遵循以下准则:

    ¥The username is a short name used in search, mentions, and t.me links. Use these guidelines when creating your username:

    • 长度必须介于 5 和 32 个字符之间。

    ¥Must be between 5 and 32 characters long.

    • 不区分大小写。

    ¥Not case sensitive.

    • 只能包含拉丁字符、数字和下划线。

    ¥May only include Latin characters, numbers, and underscores.

    • 必须以 bot 结尾,例如 tetris_botTetrisBot

    ¥Must end in bot, like tetris_bot or TetrisBot.

    • 你无法稍后更改用户名。

    ¥You can't change the username later. 4. 复制 BotFather 生成的机器人令牌,并将其作为访问令牌添加到 n8n 中。

¥Copy the bot token the BotFather generates and add it as the Access Token in n8n.

更多信息,请参阅 BotFather 创建新机器人文档

¥Refer to the BotFather Create a new bot documentation for more information.