Customer Identity (CIAM)
Email + Email Verification Code Login
During the process of calling the email verification code login interface, graphic captcha verification is required first. A successful call will return the user's session_token, while a failure will return error information. Automatic registration can be supported based on the registration configuration enabled in the enterprise center.
# Request Description
POST https://{your_domain}/api/v2/sdk/login/email-verify-code
# Request Headers
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Calling Client Operating System Version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Calling Client Device Fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Calling Client 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) |
| X-L | For Internationalization Language Setting | No | String | zh |
| X-client-id | Application Authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
| content-type | Content Format Type | Yes | String | application/json |
# Request Example
{
"emial":"zhangsan@qq.com",
"verify_code":"123456"
}
1
2
3
4
2
3
4
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| Yes | String | The email address to receive the verification code | ||
| verify_code | Verification Code | Yes | String | The received verification code To obtain the verification code, please refer to the Send Email Verification Code API type=LOGIN_EMS |
# Response Example
Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"session_token": "btsiBjx85prcZu6I6Ki057Tmw3nSF2VO",
"expire": 432000,
"status": "SUCCESS",
"id_token": "eyJ0NiJ9.eyJ1cI6IjIifX0.DeWt4QuZXso"
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "IDAAS.SDK.CAPTCHA.0007",
"error_msg": "Incorrect verification code"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| status | Login Process Status Identifier | String | This field may return the following value: SUCCESS indicates successful login |
| expire | session_token Validity Period | Number | Session_token validity period, within which the session_token can be used to obtain a ticket |
| session_token | User session_token | String | User session_token, which can be used to call IDaaS APIs to obtain a new id_token |
| id_token | Short-term Valid, API Call Token | String | This field is in JWT format and contains user identity information. You can refer to Get User Information from id_token to obtain user information. The token validity period defaults to 5 minutes and is configurable |
# Error Codes
| Status Code | Error Code | Error Message | Action |
|---|---|---|---|
| 400 | IDAAS.SDK.PARAM.0001 | Device information is incomplete | Please check if the input device information is complete |
| 设备信息不完整 | |||
| 400 | IDAAS.SDK.PARAM.0002 | clientId cannot be empty | Please check if the input clientId is empty |
| clientId不能为空 | |||
| 400 | IDAAS.SDK.PARAM.0003 | The app is not registered, please register the app first | Please check if the input clientId is correct |
| 应用未注册,请先注册应用 | |||
| 400 | IDAAS.SDK.PARAM.0009 | Verification code cannot be empty | Please check if the input verification code is empty |
| 验证码不能为空 | |||
| 400 | IDAAS.SDK.USER.0004 | Mobile number cannot be empty | Please check if the input mobile number is empty |
| 手机号不能为空 | |||
| 400 | IDAAS.SDK.CAPTCHA.0007 | Incorrect verification code | Please check if the input verification code is correct |
| 验证码不正确 | |||
| 400 | IDAAS.SDK.USER.0001 | User not found | Please register and try again |
| 用户未找到 | |||
| 400 | IDAAS.SDK.USER.0039 | User is disabled | Please contact the administrator |
| 用户已被禁用 | |||
| 500 | IDAAS.SDK.COM.0002 | System busy, please try again later | Please retry the call or contact Zhuyun staff |
| 系统繁忙,请稍后再试 |
I understand. Please provide the Markdown content you need translated.
