接收用户消息
相关内容:
该接口用于接收用户在客服会话中的消息,包含进入客服会话事件。
星汉服务器会将用户在客服会话中产生的消息通知到开发者服务器,若未配置回调地址请与星汉商务对接组联系。
示例
请求方式为 POST
。
{
"ToUserName": "toUser",
"FromUserName": "fromUser",
"CreateTime": 1482048670,
"MsgType": "text",
"Content": "this is a test",
"MsgId": 1234567890123456
}
字段说明
字段 | 字段类型 | 字段说明 |
---|---|---|
ToUserName | string | 小程序原始id,由微信提供 |
FromUserName | string | 用户openid |
CreateTime | number | 消息创建时间,整型 |
MsgType | string | 消息类型 |
Content | string | 文本消息内容 |
MsgId | number | 消息id,64位整型 |
星汉返回的消息字段与微信一致。
关于 MsgType
的详细说明,请参考 接收消息和事件(微信文档) 。