//method: 发送客服消息 //help : http://mp.weixin.qq.com/wiki/index.php?title=发送客服消息 //url : https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN public static WechatResponseWrapper SendCustomMessage(String acessToken, WechatSendMessage message) { String reqUrl = String.Format("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token={0}", acessToken); String respText = new Curl().Post(reqUrl, JsonConvert.SerializeObject(message)); return new WechatResponseWrapper(reqUrl, respText); }
public void SendCustomMessage(WechatSendMessage message) { var result = WechatBasicApi.SendCustomMessage(GetAccessToken().access_token, message); result.ThrowifFailed(); }