文档接口: https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN
创建机器人小助手
消息推送测试
import requests
import json
url = "https://open.feishu.cn/open-apis/bot/v2/hook/bdd450c0-db1b-4xxxxx"
headers = {"Content-Type": "application/json"}
body = json.dumps({"msg_type": "text","content": {"text":"request example"}})
response = requests.request("POST", url, headers=headers, data=body)
print(response.text)
获取艾特人 open_id文章来源:https://www.toymoban.com/news/detail-562257.html
import requests
import json
url = "https://open.feishu.cn/open-apis/contact/v3/users/batch_get_id"
headers = {"Content-Type": "application/json","Authorization": "Bearer t-7f1bcd13fc57d46bac21793a18e560"}
body = json.dumps({"emails": ["邮箱"],"mobiles": ["手机号"]})
response = requests.request("POST", url, headers=headers, data=body)
print(response.text)
@特定人请求文章来源地址https://www.toymoban.com/news/detail-562257.html
import requests
import json
url = "https://open.feishu.cn/open-apis/bot/v2/hook/bdd450c0-db1b-4xxxxx"
headers = {"Content-Type": "application/json"}
body = json.dumps({"msg_type": "text","content": {"text": "<at user_id = \"open_id\">Tom</at> text content"}})
response = requests.request("POST", url, headers=headers, data=body)
print(response.text)
到了这里,关于飞书机器人小助手@特定人的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!