POST sns/v3/SendMsg/SendWorkWechatMsg
发送企业微信消息
Request
URI Params
None.
Body Params
消息体
MsgSyncModel字段名 | 字段说明 | 字段类型 | 附加信息 |
---|---|---|---|
WorkWechatAppID |
企微应用 填写以哪个企微应用的名义发送消息; 如果不填写,默认以授权的第一个应用发送 |
integer |
None. |
IsToAll |
是否发送全体 |
boolean |
None. |
MemberType |
成员类型 |
SyncMemberType |
None. |
RvIDs |
接收成员ID 发送全体时 此参数无效 |
Collection of string |
None. |
MsgType |
消息类型 |
SyncMsgType |
None. |
Msg |
消息体 |
Object |
None. |
Request Formats
application/json, text/json
Sample:
{ "WorkWechatAppID": 1, "IsToAll": true, "MemberType": 1, "RvIDs": [ "sample string 1", "sample string 2" ], "MsgType": 0, "Msg": {} }
application/x-www-form-urlencoded
Sample:
Sample not available.
Response
APIResult字段名 | 字段说明 | 字段类型 | 附加信息 |
---|---|---|---|
Ret |
返回结果(0-成功;>0-失败) ret=0 成功返回/ret=1 参数错误/ret=2 频率受限 /ret=3 Token无效 /ret=4 服务器内部错误 /ret=5 用户操作错误 / ret=6 停机维护 / ret=7 身份失效 |
integer |
None. |
ErrCode |
错误代码,因功能而异 |
integer |
None. |
Msg |
返回信息 |
string |
None. |
SeqId |
请求序列 |
integer |
None. |
InfoMsg |
API附加信息 |
string |
None. |
application/json, text/json
Sample:
{ "Ret": 1, "ErrCode": 2, "Msg": "sample string 3", "SeqId": 4, "InfoMsg": "sample string 5" }