钉钉接入自定义机器人

实现

在钉钉群里创建个自定义机器人后会获得一个url,剩下的就是传参了。

安全设置如果选择IP地址(段),需要配置公网ip。可以在直接百度ip,就会显示出你的公网ip。

javascript 复制代码
const URL = `https://oapi.dingtalk.com/robot/send?access_token=5ad7dc0e****`

function send() {
    fetch(URL, {
        method: 'POST',
        headers:{
            "Content-Type":"application/json"
        },
        body: JSON.stringify({
            "msgtype": "text",
            "text": {
                "content": "21321421"
            },
        })
    }).then(res => res.json()).then(data => { console.log("success>>", data) }).catch(console.log)
}

当然,如果在Linux命令行环境下,可以使用curl命令的方式发送

java 复制代码
curl 'https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxx' \
 -H 'Content-Type: application/json' \
 -d '{"msgtype": "text","text": {"content":"我就是我, 是不一样的烟火"}}'

官方文档

相关推荐
gaoshengdainzi1 小时前
血管介入手术机器人测试系统YY/T·1994-2025
机器人·血管介入手术机器人测试系统
gaoshengdainzi5 小时前
下肢外骨骼机器人测试模体YY/T·1973-2025
机器人·下肢外骨骼机器人测试模体
沫儿笙6 小时前
焊接机器人弧焊节气设备
人工智能·机器人
sheji1056 小时前
扫地机器人行业深度分析报告
大数据·人工智能·机器人·智能硬件
gaoshengdainzi6 小时前
机器人无线共存测试系统YY 9706.102/GB 4824
机器人·医疗机器人产品检测设备·机器人无线共存测试系统
_________MAN8 小时前
用 mxreality.js.plus + 自研超低延迟摄像头,实现浏览器VR遥控无人车!附完整代码
机器人·vr
gaoshengdainzi8 小时前
导航手术具身机器人测试系统YY/T 1901-2023
机器人·导航手术具身机器人测试系统
Robot_Nav9 小时前
机器人全身控制(WBC)深度技术综述:从经典理论到VLA前沿
机器人·具身智能·vla·wbc
zh路西法1 天前
【udev重命名详细教程】放弃硬编码,从重命名开始
linux·机器人
lovep11 天前
VLA系列RT-1: Robotics Transformer for Real-World Control 论文阅读和理解
机器人·具身智能·vla·rt-1