获取群分享链接
POST
https://open.feishu.cn/open-apis/im/v1/chats/{chat_id}/link
chat_id
参数指定的群组中错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
400 | 232001 | Your request contains an invalid request parameter. | 参数错误,参考本文档检查输入参数。 |
400 | 232006 | Your request specifies a chat_id which is invalid. | 无效的 chat_id,请检查chat_id是否正确。 |
400 | 232009 | Your request specifies a chat which has already been dissolved. | 群组已被解散。 |
400 | 232010 | Operator and chat can NOT be in different tenants. | 操作者和被操作的群组应该在同一租户下。 |
400 | 232011 | Operator can NOT be out of the chat. | 操作者需要在群组中。 |
400 | 232019 | The request has been rate limited. | 触发群限流,请控制请求的速度,详情参见频控策略。 |
400 | 232025 | Bot ability is not activated. | 应用需要开启机器人能力。 |
400 | 232033 | The operator or invited bots does NOT have the authority to manage external chats without the scope. | 没有权限操作外部群。 |
400 | 232061 | Secret chat cannot be share link. | 密聊不支持分享群链接。 |
400 | 232062 | P2P chat cannot be share link. | 单聊不支持分享群链接。 |
400 | 232063 | Team cannot be share link. | 团队群不支持分享群链接。 |
400 | 232064 | The operator is not a group owner or administrator, no permission to share chat link. | 该群开启了“仅群主和群管理员可添加群成员/分享群”,请检查操作者在群中的身份。 |
400 | 232065 | The User/Bot can NOT be found. | 请检查机器人和用户是否存在。 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/im/v1/chats//link' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"validity_period": "week"
}'
响应示例响应示例
{
"code": 0,
"msg": "success",
"data": {
"share_link": "https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=3nf8789-4rfx-427d-a6bf-ed1d2df348aabd",
"expire_time": "1609296809",
"is_permanent": false
}
}
请求参数
Path 参数
chat_id
string
必需
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-01-13 05:41:08