场景:在平时的工作中,经常需要执行一些定时任务,并且当定时任务执行失败后需要告警出来到钉钉群,使用[钉钉机器人]可以简单快速的帮我们完成这件事情。
curl 'https://oapi.dingtalk.com/robot/send?access_token=9e2549f6a0bb28767bdexxxxxxxxxxxxxxxxxx81975c981005abbd' \
-H 'Content-Type: application/json' \
-d '
{"msgtype": "text",
"text": {
"content": "我就是我, 是不一样的烟火"
}
}'
效果图:

curl 'https://oapi.dingtalk.com/robot/send?access_token=9e2549f6a0xxxxxxxxxxxxxxxxxx447981975c981005abbd' \
-H 'Content-Type: application/json' \
-d '{"msgtype":"text","text":{"content":"我就是我, 是不一样的烟火"},"at":{"atMobiles":["176xxxx1234"],"isAtAll":false}}'
效果图:
