文檔接口: https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN
創(chuàng)建機器人小助手
?
消息推送測試
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文章來源:http://www.zghlxwxcb.cn/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)
@特定人請求文章來源地址http://www.zghlxwxcb.cn/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)
到了這里,關(guān)于飛書機器人小助手@特定人的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!