User profile

Update time: 2023/09/25 09:39:00

User profile change callback

  • Example - user profile change request:

    2.1. HTTP example

    2.2. cURL example

    2.3. JSON field in message body

2.1 HTTP example:

POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
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":"It is a signature","timestamp":"1552461406587"}

2.2 cURL example:

curl -X POST \
  http://yunxinservice.com.cn/receiveMsg.action \
  -H 'appkey: 158983881e092b052194d219453d6542' \
  -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":"It is a signature","timestamp":"1552461406587"}'

2.3 JSON field in message body:

Not every field in the callback message will necessarily be copied. Please pay attention to the nulling of each field.
message delivery for only the field of a user profile change
NameTypeRequiredDescription
eventTypeIntegerYesValue is 3, which indicates User profile change callback
accountStringYesUser account
deviceIdStringYesSender device id
clientTypeStringYesSending client type: AOS、IOS、PC、WINPHONE、WEB、REST
nameStringNoNickname
iconStringNoprofile picture icon
signStringNoSignature
emailStringNoemail
birthStringNoBirthday
mobileStringNoPhone number
genderIntegerNoUser gender, 0 indicates unknown, 1 indicates male, 2 indicates female
exStringNoUser name card extension field
timestampStringYesOperation time, string type

Callback - friend relationship change

  • Example - request of changing friend relationship

    3.1. HTTP example

    3.2. cURL example

    3.3. JSON field in message body

3.1 HTTP example:

POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
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":"Add me pls","timestamp":"1552461598694","toAccount":"yx0002","verifyType":1}

3.2 cURL example:

curl -X POST \
  http://yunxinservice.com.cn/receiveMsg.action \
  -H 'appkey: 158983881e092b052194d219453d6542' \
  -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":"Add me pls","timestamp":"1552461598694","toAccount":"yx0002","verifyType":1}'

3.3 JSON field in message body:

Not every field in the callback message will necessarily be copied. Please pay attention to the nulling of each field.
Note that message delivery for fields for adding and removing friends are different
NameTypeRequiredDescription
eventTypeIntegerYesValue is 4, which indicates add friend callback
Value is 5, which indicates remove friend callback
fromAccountStringYesInitiator account
toAccountStringYesRecipient account
fromDeviceIdStringYesSender device id
fromClientTypeStringYesSending client type: AOS、IOS、PC、WINPHONE、WEB、REST
verifyTypeIntegerNoThis field must be included when adding a friend; interpretations: 1 add as friend, 2 request to add as friend, 3 agree to add as friend, 4 refuse to add as friend
msgStringNoThis field is valid when adding a friend; interpretation: request information corresponding to adding as friend
timestampStringYesOperation time, string type
Was this page helpful?
Yes
No
  • User profile change callback
  • 2.1 HTTP example:
  • 2.2 cURL example:
  • 2.3 JSON field in message body:
  • Callback - friend relationship change
  • 3.1 HTTP example:
  • 3.2 cURL example:
  • 3.3 JSON field in message body: