电报机器人 - getChat - invite_link

Telegram Bot - getChat - invite_link

我在 python 中有一个运行此代码的非常简单的机器人:

def get_chat(chat_id=None):
    data = {
        'chat_id': str(chat_id)
    }
    resp = urllib2.urlopen(BASE_URL + 'getChat?'+urllib.urlencode(data)).read()
        return resp

我的机器人是聊天的管理员

它应该接收这里所说的对象聊天 https://core.telegram.org/bots/api#getchat 和对象内部的聊天 link 但我唯一能收到的是:

{"ok":true,"result":{"id":#####,"title":"####","type":"supergroup"}}

为什么?

尝试使用 exportChatInviteLink 方法。 (documentation)

另请注意 any previously generated link is revoked.

https://core.telegram.org/bots/api#chat

invite_link:字符串,可选。聊天邀请 link,用于群组、超级群组和频道聊天。聊天中的每个管理员都会生成自己的邀请 link,因此机器人必须首先使用 exportChatInviteLink 生成 link。仅在 getChat 中返回。