Employee Identity (EIAM)
Mobile Number + SMS Verification Code Secondary Authentication Interface
API
If mobile number + SMS verification code secondary authentication is required during the login process, call this interface for secondary authentication.
# Request Description
Request URL https://{your_domain}/api/v2/sdk/mfa/sms
Request Method POST
Content-Type application/json
# Request Header Parameters
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Calling Party OS Version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Calling Party Device Fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Calling Party IP | No | String | 192.168.1.2 |
| X-agent | User-Agent Information | Yes | String | Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15(KHTML, like Gecko) Mobile/15E148/HuaWei-AnyOffice/2.6.1802.0010/com.huawei.cloudlink.workplace |
| X-L | For Internationalization Language Setting | No | String | zh |
| X-client-id | Application Authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
| X-state-token | Temporary Token | Yes | String | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZW1... |
# Request Body Example
{
"mobile": "15201657312",
"verify_code": "123456"
}
1
2
3
4
2
3
4
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| mobile | Mobile Number | Yes | String | The mobile number receiving the verification code |
| verify_code | SMS Verification Code | Yes | String | The received verification code To get the verification code, please refer to the Send SMS Verification Code Interface type = MFA_AUTH_SMS |
# Response Example
Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "SUCCESS",
"expire": 43200,
"session_token": "LGTiTNVDFPlpefV3F3Hla7RUFTqInsqa",
"id_token": "eyJraWQiOiJrMSIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJJc3N1ZXIiLCJhdWQiOiJBdWRpZW5jZSIsImV4cCI6MTY1MzQ4NDQxMiwianRpIjoieUxSVGZXY1VkYk9PeUFpbHdZU0ZqZyIsImlhdCI6MTY1MzQ2NjQxMiwibmJmIjoxNjUzNDY2MjkyLCJzdWIiOiJzdWJqZWN0IiwiYXBpIjoie1wibmFtZVwiOlwiXCIsXCJtb2JpbGVcIjpcIis4Ni0xNTkwNzEzMjg1MlwiLFwiaWRcIjpcIjIwMjIwNDI1MTQwMTM4NTE5LUJGMUItNTI4QjA1NTFCXCIsXCJ1c2VyTmFtZVwiOlwibG91eGlcIixcImVtYWlsXCI6XCIxMUBxcS5jb21cIn0ifQ.al79knH1fKa4aT4AFr_FMjqBKu2pV_g-lKzzgHzmor5X-dHwSBUtjH38KOzjIqHvkcRMjXQuBnWmjRI7-0Djn2LuWVueaf3wRXLscCWiSDC7chjUyTRXMatYINxdvW-oSWFYGFqqbdsavLqOnvehd7ahEaTuiL9yZolvslZIkIxjxBJJu7A9Ln2sk3wf9pxXU83jIJ8ubPQBoVS-ilerTTJOKDZ9XsL2ftJsaqdTJK_mYbvKaVpLIVyHHJ2NcF6f-Al4N4kc8cgxtSgSKFDcR7Bz7dYlOcfUXCPAzJ3NZInm8UaksiWU02tvlvTRvRdoxZNnvD5vamZ5hjFc-cW5jA"
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "SDK.COMMON.1001",
"error_msg": "Parameter X-client-id cannot be left blank."
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| status | Return Result | String | Possible values for this field are: SUCCESS Login successful ACCESS_DENIED Access denied |
| expire | session_token Validity Period | Number | session_token validity period, within which session_token can be used to obtain ticket |
| session_token | User session_token | String | User session_token, which can be used to call IDaaS interfaces to obtain sso_ticket. sso_ticket can be exchanged for user information |
