C# Class Senparc.Weixin.MP.AdvancedAPIs.GroupMessageApi

高级群发接口
Datei anzeigen Open project: JeffreySu/WeiXinMPSDK

Public Methods

Method Description
DeleteSendMessage ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : WxJsonResult

删除群发消息

DeleteSendMessageAsync ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】删除群发消息

GetGroupMessageResult ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : GetSendResult

查询群发消息发送状态【订阅号与服务号认证后均可用】

GetGroupMessageResultAsync ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】查询群发消息发送状态【订阅号与服务号认证后均可用】

GetVideoMediaIdResult ( string accessTokenOrAppId, string mediaId, string title, string description, int timeOut = Config.TIME_OUT ) : VideoMediaIdResult

获取视频群发用的MediaId

GetVideoMediaIdResultAsync ( string accessTokenOrAppId, string mediaId, string title, string description, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取视频群发用的MediaId

SendGroupMessageByGroupId ( string accessTokenOrAppId, string groupId, string value, GroupMessageType type, bool isToAll = false, int timeOut = Config.TIME_OUT ) : SendResult

根据分组进行群发【订阅号与服务号认证后均可用】 请注意: 1、该接口暂时仅提供给已微信认证的服务号 2、虽然开发者使用高级群发接口的每日调用限制为100次,但是用户每月只能接收4条,请小心测试 3、无论在公众平台网站上,还是使用接口群发,用户每月只能接收4条群发消息,多于4条的群发将对该用户发送失败。 4、群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发

SendGroupMessageByGroupIdAsync ( string accessTokenOrAppId, string groupId, string value, GroupMessageType type, bool isToAll = false, int timeOut = Config.TIME_OUT ) : Task

【异步方法】根据分组进行群发【订阅号与服务号认证后均可用】 请注意: 1、该接口暂时仅提供给已微信认证的服务号 2、虽然开发者使用高级群发接口的每日调用限制为100次,但是用户每月只能接收4条,请小心测试 3、无论在公众平台网站上,还是使用接口群发,用户每月只能接收4条群发消息,多于4条的群发将对该用户发送失败。 4、群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发

SendGroupMessageByOpenId ( string accessTokenOrAppId, GroupMessageType type, string value, int timeOut = Config.TIME_OUT ) : SendResult

根据OpenId进行群发

SendGroupMessageByOpenIdAsync ( string accessTokenOrAppId, GroupMessageType type, string value, int timeOut = Config.TIME_OUT ) : Task

【异步方法】根据OpenId进行群发

SendGroupMessagePreview ( string accessTokenOrAppId, GroupMessageType type, string value, string openId, string wxName = null, int timeOut = Config.TIME_OUT ) : SendResult

预览接口【订阅号与服务号认证后均可用】 注意:openId与wxName两者任选其一,同时传入以wxName优先

SendGroupMessagePreviewAsync ( string accessTokenOrAppId, GroupMessageType type, string value, string openId, string wxName = null, int timeOut = Config.TIME_OUT ) : Task

【异步方法】预览接口【订阅号与服务号认证后均可用】 注意:openId与wxName两者任选其一,同时传入以wxName优先

SendVideoGroupMessageByOpenId ( string accessTokenOrAppId, string title, string description, string mediaId, int timeOut = Config.TIME_OUT ) : SendResult

根据OpenID列表群发视频消息【订阅号不可用,服务号认证后可用】 注意:群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发

SendVideoGroupMessageByOpenIdAsync ( string accessTokenOrAppId, string title, string description, string mediaId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】根据OpenID列表群发视频消息【订阅号不可用,服务号认证后可用】 注意:群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发

WxCardGroupMessagePreview ( string accessTokenOrAppId, string cardId, string code, string openId, string wxName, string timestamp, string signature, int timeOut = Config.TIME_OUT ) : SendResult

预览卡券接口

WxCardGroupMessagePreviewAsync ( string accessTokenOrAppId, string cardId, string code, string openId, string wxName, string timestamp, string signature, int timeOut = Config.TIME_OUT ) : Task

【异步方法】预览卡券接口

Method Details

DeleteSendMessage() public static method

删除群发消息
public static DeleteSendMessage ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
msgId string 发送出去的消息ID
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

DeleteSendMessageAsync() public static method

【异步方法】删除群发消息
public static DeleteSendMessageAsync ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
msgId string 发送出去的消息ID
timeOut int 代理请求超时时间(毫秒)
return Task

GetGroupMessageResult() public static method

查询群发消息发送状态【订阅号与服务号认证后均可用】
public static GetGroupMessageResult ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : GetSendResult
accessTokenOrAppId string
msgId string 群发消息后返回的消息id
timeOut int 代理请求超时时间(毫秒)
return GetSendResult

GetGroupMessageResultAsync() public static method

【异步方法】查询群发消息发送状态【订阅号与服务号认证后均可用】
public static GetGroupMessageResultAsync ( string accessTokenOrAppId, string msgId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
msgId string 群发消息后返回的消息id
timeOut int 代理请求超时时间(毫秒)
return Task

GetVideoMediaIdResult() public static method

获取视频群发用的MediaId
public static GetVideoMediaIdResult ( string accessTokenOrAppId, string mediaId, string title, string description, int timeOut = Config.TIME_OUT ) : VideoMediaIdResult
accessTokenOrAppId string
mediaId string
title string
description string
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.GroupMessage.VideoMediaIdResult

GetVideoMediaIdResultAsync() public static method

【异步方法】获取视频群发用的MediaId
public static GetVideoMediaIdResultAsync ( string accessTokenOrAppId, string mediaId, string title, string description, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
mediaId string
title string
description string
timeOut int
return Task

SendGroupMessageByGroupId() public static method

根据分组进行群发【订阅号与服务号认证后均可用】 请注意: 1、该接口暂时仅提供给已微信认证的服务号 2、虽然开发者使用高级群发接口的每日调用限制为100次,但是用户每月只能接收4条,请小心测试 3、无论在公众平台网站上,还是使用接口群发,用户每月只能接收4条群发消息,多于4条的群发将对该用户发送失败。 4、群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发
public static SendGroupMessageByGroupId ( string accessTokenOrAppId, string groupId, string value, GroupMessageType type, bool isToAll = false, int timeOut = Config.TIME_OUT ) : SendResult
accessTokenOrAppId string
groupId string 群发到的分组的group_id,参加用户管理中用户分组接口,若is_to_all值为true,可不填写group_id
value string 群发媒体文件时传入mediaId,群发文本消息时传入content,群发卡券时传入cardId
type GroupMessageType
isToAll bool 用于设定是否向全部用户发送,值为true或false,选择true该消息群发给所有用户,选择false可根据group_id发送给指定群组的用户
timeOut int 代理请求超时时间(毫秒)
return SendResult

SendGroupMessageByGroupIdAsync() public static method

【异步方法】根据分组进行群发【订阅号与服务号认证后均可用】 请注意: 1、该接口暂时仅提供给已微信认证的服务号 2、虽然开发者使用高级群发接口的每日调用限制为100次,但是用户每月只能接收4条,请小心测试 3、无论在公众平台网站上,还是使用接口群发,用户每月只能接收4条群发消息,多于4条的群发将对该用户发送失败。 4、群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发
public static SendGroupMessageByGroupIdAsync ( string accessTokenOrAppId, string groupId, string value, GroupMessageType type, bool isToAll = false, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
groupId string 群发到的分组的group_id,参加用户管理中用户分组接口,若is_to_all值为true,可不填写group_id
value string 群发媒体文件时传入mediaId,群发文本消息时传入content,群发卡券时传入cardId
type GroupMessageType
isToAll bool 用于设定是否向全部用户发送,值为true或false,选择true该消息群发给所有用户,选择false可根据group_id发送给指定群组的用户
timeOut int 代理请求超时时间(毫秒)
return Task

SendGroupMessageByOpenId() public static method

根据OpenId进行群发
public static SendGroupMessageByOpenId ( string accessTokenOrAppId, GroupMessageType type, string value, int timeOut = Config.TIME_OUT ) : SendResult
accessTokenOrAppId string
type GroupMessageType
value string 群发媒体文件时传入mediaId,群发文本消息时传入content,群发卡券时传入cardId
timeOut int 代理请求超时时间(毫秒)
return SendResult

SendGroupMessageByOpenIdAsync() public static method

【异步方法】根据OpenId进行群发
public static SendGroupMessageByOpenIdAsync ( string accessTokenOrAppId, GroupMessageType type, string value, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
type GroupMessageType
value string 群发媒体文件时传入mediaId,群发文本消息时传入content,群发卡券时传入cardId
timeOut int 代理请求超时时间(毫秒)
return Task

SendGroupMessagePreview() public static method

预览接口【订阅号与服务号认证后均可用】 注意:openId与wxName两者任选其一,同时传入以wxName优先
public static SendGroupMessagePreview ( string accessTokenOrAppId, GroupMessageType type, string value, string openId, string wxName = null, int timeOut = Config.TIME_OUT ) : SendResult
accessTokenOrAppId string
type GroupMessageType
value string 群发媒体消息时为media_id,群发文本信息为content
openId string 接收消息用户对应该公众号的openid
wxName string 接收消息用户的微信号
timeOut int 代理请求超时时间(毫秒)
return SendResult

SendGroupMessagePreviewAsync() public static method

【异步方法】预览接口【订阅号与服务号认证后均可用】 注意:openId与wxName两者任选其一,同时传入以wxName优先
public static SendGroupMessagePreviewAsync ( string accessTokenOrAppId, GroupMessageType type, string value, string openId, string wxName = null, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
type GroupMessageType
value string 群发媒体消息时为media_id,群发文本信息为content
openId string 接收消息用户对应该公众号的openid
wxName string 接收消息用户的微信号
timeOut int 代理请求超时时间(毫秒)
return Task

SendVideoGroupMessageByOpenId() public static method

根据OpenID列表群发视频消息【订阅号不可用,服务号认证后可用】 注意:群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发
public static SendVideoGroupMessageByOpenId ( string accessTokenOrAppId, string title, string description, string mediaId, int timeOut = Config.TIME_OUT ) : SendResult
accessTokenOrAppId string
title string
description string
mediaId string
timeOut int 代理请求超时时间(毫秒)
return SendResult

SendVideoGroupMessageByOpenIdAsync() public static method

【异步方法】根据OpenID列表群发视频消息【订阅号不可用,服务号认证后可用】 注意:群发视频时需要先调用GetVideoMediaIdResult接口获取专用的MediaId然后进行群发
public static SendVideoGroupMessageByOpenIdAsync ( string accessTokenOrAppId, string title, string description, string mediaId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
title string
description string
mediaId string
timeOut int 代理请求超时时间(毫秒)
return Task

WxCardGroupMessagePreview() public static method

预览卡券接口
public static WxCardGroupMessagePreview ( string accessTokenOrAppId, string cardId, string code, string openId, string wxName, string timestamp, string signature, int timeOut = Config.TIME_OUT ) : SendResult
accessTokenOrAppId string
cardId string
code string
openId string
wxName string
timestamp string
signature string
timeOut int
return SendResult

WxCardGroupMessagePreviewAsync() public static method

【异步方法】预览卡券接口
public static WxCardGroupMessagePreviewAsync ( string accessTokenOrAppId, string cardId, string code, string openId, string wxName, string timestamp, string signature, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
cardId string
code string
openId string
wxName string
timestamp string
signature string
timeOut int
return Task