V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zzzzzdai
V2EX  ›  Telegram

有大神写过 telegram 的 bot 吗?有个问题求教

  •  
  •   zzzzzdai · 2017-12-18 22:40:20 +08:00 · 5597 次点击
    这是一个创建于 2314 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我用 URL request

    https://api.telegram.org/botTOKEN/sendMessage?chat_id=1111111111&text=Hello+World

    返回了

    {"ok":false,"error_code":403,"description":"Forbidden: bot can't send messages to bots"}

    可是我那边没 block 啊???

    3 条回复    2017-12-18 23:43:55 +08:00
    Kilerd
        1
    Kilerd  
       2017-12-18 22:59:36 +08:00
    Forbidden: bot can't send messages to bots

    看不懂请 google 翻译,谢谢。
    ferrum
        2
    ferrum  
       2017-12-18 23:07:13 +08:00
    chat_id 不是随便乱输的,每个用户都有一个唯一的 chat_id。
    zzzzzdai
        3
    zzzzzdai  
    OP
       2017-12-18 23:43:55 +08:00
    @ferrum 刚刚通过 userinfobot 获得了自己的 chat_id,现在可以了,谢谢各位!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1820 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:25 · PVG 00:25 · LAX 09:25 · JFK 12:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.