Instant Messaging
Login
Update time: 2023/09/25 09:40:18
Callback - log in
-
Example - request of login callback
32.1. HTTP example
32.2. cURL example
32.3. JSON field in message body
32.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":35,"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"}
32.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":35,"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"}'
32.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.
Name | Type | Required | Description |
---|---|---|---|
eventType | Integer | Yes | Value is 36, which indicates login callback |
fromAccount | String | Yes | Operator account |
fromDeviceId | String | Yes | Operator device id |
fromClientType | String | Yes | Operator client type: AOS、IOS、PC、WINPHONE、WEB、REST |
fromClientIp | String | No | Operator's client IP address |
fromClientPort | String | No | Operator's client port number |
token | String | Yes | Login token |
authType | Integer | Yes | Login authentication mode, 0 indicates classic mode, 1 indicates dynamic token mode, 2 indicates verification based on third-party callbacks (in this mode, CommsEase will not verify tokens) |
loginExt | String | Yes | Login extension field |
customTag | String | Yes | Login custom tag |
customClientType | String | Yes | Custom client type |
autoLogin | Integer | No | Whether the login is automatic |
timestamp | String | Yes | Operation time, string type |
Was this topic helpful?
Yes
No