zzzzzdai
V2EX  ›  Telegram

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

  •  
  •   zzzzzdai · Dec 18, 2017 · 6573 views
    This topic created in 3265 days ago, the information mentioned may be changed or developed.

    我用 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 replies  •  2017-12-18 23:43:55 +08:00
    Kilerd
    Kilerd
    Dec 18, 2017
    1
    Forbidden: bot can't send messages to bots

    看不懂请 google 翻译,谢谢。
    bayallen
    bayallen
    Dec 18, 2017
    2
    chat_id 不是随便乱输的,每个用户都有一个唯一的 chat_id。
    zzzzzdai
    zzzzzdai
    OP
    Dec 18, 2017
    3
    @ferrum 刚刚通过 userinfobot 获得了自己的 chat_id,现在可以了,谢谢各位!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2012 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 15:14 · PVG 23:14 · LAX 07:14 · JFK 10:14
    ♥ Do have faith in what you're doing.