You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何从网页向Telegram发送带超链接的预定义消息

网站向Telegram机器人发送带超链接的预定义文本(点歌系统场景)

我想在自己的网站上搭建点歌系统,需要实现从网站向Telegram机器人发送带有超链接的预定义文本。目前尝试了以下几种方法:

  • 方法1:使用Telegram分享链接

    <a href="https://t.me/share/url?url=Ring of Fire by Johnny Cash">发送歌曲链接</a>
    

    此方法可以正常使用,但无法指定目标用户ID或机器人名称

  • 方法2:调用Telegram Bot API的sendMessage接口

    <a href="https://api.telegram.org/bot[Bot-Api-code]/sendMessage?chat_id=[@......]&text=[test]" rel="nofollow noreferrer">发送测试消息</a>
    
  • 方法3:尝试简化的Bot API链接格式

    <a href="https://t.me/bot[Bot-Api-code]/sendMessage?chat_id=[@......]&text=[test]" rel="nofollow noreferrer">发送测试消息</a>
    

内容的提问来源于stack exchange,提问作者Roel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.14 18:25:34