zzzzzdai
V2EX  ›  Telegram

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

  •  
  •   zzzzzdai · Dec 18, 2017 · 6135 views
    This topic created in 3075 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
        1
    Kilerd  
       Dec 18, 2017
    Forbidden: bot can't send messages to bots

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