Obtain a token from a carrier
This topic describes how to obtain a token from the three major carriers in China and describes the interaction flow.
Interaction flow
The following figure shows the process for China Mobile, China Unicom, and China Telecom users to obtain a token.

Token acquisition methods
Obtaining a token for mobile users
Communication protocol | Method | Access address |
HTTPS+application/Json | POST | https://msg.cmpassport.com/h5/getMobile |
Request parameters
Parameter | Description | Sample value |
traceId | The external serial number. This must be the same as the value of the OutId input parameter for the | mfawsxtcmyplwzpayzzvdvbsowxmkynr |
appId | Use | 300012406312 |
sign | Obtain this by calling the | 2c61b3c58ffbeed97461e31be4fd931a |
msgId | The external serial number. This must be the same as the value of the OutId input parameter for the | redbyxsdetddwaaffajcwwapspykftzx |
businessType | Use | 3 |
version | Use | 1.0 |
timestamp | The system time when the request message is sent, accurate to the millisecond. This must be the same as the value and format of the Time input parameter for the | 20201125101540980 |
Response parameters
Parameter | Description | Example |
appId | Corresponds to the AppId in the request message. | 300012406312 |
msgId | Corresponds to the msgId in the request message. | redbyxsdetddwaaffajcwwapspykftzx |
timestamp | The system time when the response message is sent. | 20201125101607932 |
resultCode | The return code of the API. | 103000 |
resultDesc | Process Status Code | Success |
token | Returned on success. The identity. | H5HTTPS4187AE9743AFCB14F8D99B9D65ED9E01 |
Obtain a token for China Unicom users
For China Unicom users, obtaining a token is a two-step process. The API supports calls in JSON and JSONP formats.
Step 1: Obtain the authentication server address
Communication protocol | Method | Access address |
HTTPS + application/Json | GET | https://nisportal.10010.com:9001/api |
Request parameters
Parameter | Description | Example |
appid | Use | 1554778161153 |
callback | The name of the JSONP callback function. This parameter is required only when you use the | callbackFunction |
Response parameters
Parameter name | Description | Example |
authurl | The authentication server address. | https://enrichgw.10010.com/d93222629f52ec79 |
Step 2: Obtain the token
Communication protocol | Method | Access address |
HTTPS + application/Json | GET | ${authurl}+"/api" |
Request parameters
Parameter name | Description | Example |
appid | Use | 1554778161153 |
callback | The name of the JSONP callback function. This parameter is required only when you use the | callbackFunction |
Response parameters
Parameter name | Description | Example |
province | The province ID. | 1 |
code | The authentication code. A 32-character string. | 7nHS1nggx2WP613750206700RN6oiRN1 |
The value of the code parameter is the token.
Obtain a token for China Telecom users
Communication protocol | Method | Access address |
HTTPS+application/x-www-form-urlencoded; charset=UTF-8 | GET | https://id6.me/gw/preuniq.do |
Request parameters
Parameter Name | Description | Example |
clientType | The client type. This must be the same as the value of the
| 30100 |
appId | Use | 9390188202 |
format | The request format. This must be the same as the value of the
| jsonp |
sign | Obtain this by calling the | D63C166FA19E1996EF********09C6A5397C10B4 |
paramKey |
| paramKey=1D7C25EB8B0B8B4CB3CF8DC60628F6549********786B0AF1FEF93FA1335057A35BF5F0B39A3867EAA9BE14B3898********8B01DE34965060445B6E1F66401D714650E4AB161CD6DCF4A72********3B856F22A192B8B0C39D7A55B961062E68C89C928894F119B25********7C548355FE9DB82852EB93C939F2200B48CD17 |
paramStr | The ciphertext of the private request parameters.
| 140********95AF8E138B94754CB4CF83BA6FB********52B258BFDFD38BF233 |
version | Use | 1.1 |
Response parameters
Parameter | Description | Example |
result | 10000 | |
msg | success | |
data | The encrypted response data. | a35336711c70456cb883f4f224e9a259 |
accessCode | The decrypted response data. Obtain the value of | H5HTTPS4187AE9743AFCB14F8D99B9D65ED9E01 |