$webhook = "https://oapi.dingtalk.com/robot/send?access_token=f123456789"; $data = [ 'msgtype' => 'markdown', "markdown"=>[ "title"=>"杭州天气", "text"=>"#### ".date("n月j日")." ." \n> \n> ![]("www.baidu.com/123.jpg")\n> ###### \n", ], ]; $data_string = json_encode($data); $result = $this->request_by_curl($webhook, $data_string); echo $result;
官方网址:消息类型和数据格式 - 钉钉开放平台