API 参考
圈组

IM 登录相关回调

更新时间: 2024/07/17 17:57:35

登录回调

HTTP示例

httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 1589838**d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache

{"eventType":36,"fromAccount":"wm1","fromClientIp":"36.18.111.225","fromClientPort":"39632","fromClientType":"AOS","fromDeviceId":"ef6b789c-3079-463b-a52b-4924ae539e01","msgFromAccid":"wm1","msgId":184409700039655569,"msgidClient":"b897b26234d246858031291f12bc498d","opeType":8,"time":1590482455336,"timestamp":"1590482457381","toAccount":"2747918666"}

cURL示例

curlcurl -X POST \
  http://yunxinservice.com.cn/receiveMsg.action \
  -H 'appkey: 158983**d219453d6542' \
  -H 'cache-control: no-cache' \
  -H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
  -H 'content-type: application/json' \
  -H 'curtime: 1541583920979' \
  -H 'md5: e89c284a5ad9a76b3176e23108920f81' \
  -d '{"eventType":36,"fromAccount":"wm1","fromClientIp":"36.18.111.225","fromClientPort":"39632","fromClientType":"AOS","fromDeviceId":"ef6b789c-3079-463b-a52b-4924ae539e01","msgFromAccid":"wm1","msgId":184409700039655569,"msgidClient":"b897b26234d246858031291f12bc498d","opeType":8,"time":1590482455336,"timestamp":"1590482457381","toAccount":"2747918666"}'

消息体中的JSON字段说明

回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。

名称类型必须说明
eventType Integer值为36,表示是登录回调
fromAccount String操作者账号
fromDeviceId String操作者设备id
fromClientType String操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST
fromClientIp String操作者的客户端IP地址
fromClientPort String操作者的客户端端口号
token String登录token
authType Integer登录鉴权方式,0表示经典模式,1表示动态token模式,2表示基于第三方回调的校验模式(该模式下云信对token不会做校验)
loginExt String登录扩展字段
customTag String登录自定义tag
customClientType String自定义端类型
autoLogin Boolean本次登录是否是自动登录
timestamp String操作时间,字符串类型
此文档是否对你有帮助?
有帮助
去反馈
  • 登录回调
  • HTTP示例
  • cURL示例
  • 消息体中的JSON字段说明