Shell中通過機器人發送釘釘群消息
阿新 • • 發佈:2018-07-10
告警 article col left xxxxxxxx adding lis ken ron 場景:在平時的工作中,經常需要執行一些定時任務,並且當定時任務執行失敗後需要告警出來到釘釘群,使用[釘釘機器人]可以簡單快速的幫我們完成這件事情。
簡單使用
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}}'
效果圖:
Shell中通過機器人發送釘釘群消息