用户信息相关回调

更新时间: 2024/03/15 14:31:49

用户资料变更回调

HTTP示例:

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

{"account":"yx0002","birth":"2009-11-30","clientType":"PC","deviceId":"4f716737-75dd-41cb-bc6c-d9516ff03f707bd899c82e64bdc8a5220c07c744","email":"555555@163.com","eventType":3,"ex":"","gender":1,"icon":"https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1552461348&di=536bb9721d145a07657df45a8da49321&src=http://img0.pconline.com.cn/pconline/1511/29/7257120_901_thumb.jpg","mobile":"18888888888","name":"0002","sign":"这是签名","timestamp":"1552461406587"}

cURL示例:

curlcurl -X POST \
  http://yunxinservice.com.cn/receiveMsg.action \
  -H 'appkey: 15898**52194d219453d6542' \
  -H 'cache-control: no-cache' \
  -H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
  -H 'content-type: application/json' \
  -H 'curtime: 1541583920979' \
  -H 'md5: e89c284a5ad9a76b3176e23108920f81' \
  -d '{"account":"yx0002","birth":"2009-11-30","clientType":"PC","deviceId":"4f716737-75dd-41cb-bc6c-d9516ff03f707bd899c82e64bdc8a5220c07c744","email":"555555@163.com","eventType":3,"ex":"","gender":1,"icon":"https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1552461348&di=536bb9721d145a07657df45a8da49321&src=http://img0.pconline.com.cn/pconline/1511/29/7257120_901_thumb.jpg","mobile":"18888888888","name":"0002","sign":"这是签名","timestamp":"1552461406587"}'

消息体中的JSON字段说明:

  • 回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
  • 只抄送用户资料变更的字段。
名称类型必须说明
eventType Integer值为3,表示是用户资料变更回调
account String用户账号
deviceId String发送方设备id
clientType String发送客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST
name String昵称
icon String头像图标
sign String签名
email Stringemail
birth String生日
mobile String手机号
gender Integer用户性别,0表示未知,1表示男,2表示女
ex String用户名片扩展字段
timestamp String操作时间,字符串类型

好友关系变更回调

HTTP示例:

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

{"eventType":4,"fromAccount":"yx0001","fromClientType":"PC","fromDeviceId":"dd950b87-3c23-4c6d-863e-4c1fdeec1ecde54f68c09b22c55214cff7618ac5","msg":"加我加我","timestamp":"1552461598694","toAccount":"yx0002","verifyType":1}

cURL示例:

curlcurl -X POST \
  http://yunxinservice.com.cn/receiveMsg.action \
  -H 'appkey: 1589838**194d219453d6542' \
  -H 'cache-control: no-cache' \
  -H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
  -H 'content-type: application/json' \
  -H 'curtime: 1541583920979' \
  -H 'md5: e89c284a5ad9a76b3176e23108920f81' \
  -d '{"eventType":4,"fromAccount":"yx0001","fromClientType":"PC","fromDeviceId":"dd950b87-3c23-4c6d-863e-4c1fdeec1ecde54f68c09b22c55214cff7618ac5","msg":"加我加我","timestamp":"1552461598694","toAccount":"yx0002","verifyType":1}'

消息体中的JSON字段说明:

  • 回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
  • 注意区分添加好友和删除好友抄送的字段有所不同。
名称类型必须说明
eventType Integer值为4,表示是添加好友回调;
值为5,表示是删除好友回调
fromAccount String发起者账号
toAccount String接收者账号
fromDeviceId String发送方设备id
fromClientType String发送客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST
verifyType Integer添加好友时此字段必有;含义:1直接加好友,2请求加好友,3同意加好友,4拒绝加好友
msg String添加好友时此字段有效;含义:加好友对应的请求信息
timestamp String操作时间,字符串类型
此文档是否对你有帮助?
有帮助
去反馈
  • 用户资料变更回调
  • HTTP示例:
  • cURL示例:
  • 消息体中的JSON字段说明:
  • 好友关系变更回调
  • HTTP示例:
  • cURL示例:
  • 消息体中的JSON字段说明: