Employee Identity (EIAM)
Get User Details by Mobile Number
API
# Permissions
The Identity Management API is authorized at the application dimension. Before calling the API, you need to set API permissions for different applications. For details, please refer to API Permissions.
| Permission Code | Description |
|---|---|
| user_all | Read and write permissions for user management APIs |
| user_read | Read permissions for user management APIs |
| all | Read and write permissions for all APIs |
| read | Permissions for all read APIs |
# Request Specification
POST https://{your_domain}/api/v2/tenant/users/user-by-mobile
# Request Headers
| Parameter | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| Authorization | Authorization | Yes | String | Format: Bearer {access_token} |
| Content-Type | Content Type | Yes | String | Fixed value: application/json; charset=utf-8 |
# Request Example
{
"mobile": "15204130006"
}
1
2
3
2
3
# Request Parameters
| Parameter | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| mobile | Mobile Number | Yes | String |
# Return Example
Correct Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"user_id": "20220825141325371-4D03-81EF80243",
"org_id": "20210529172248496-D329-5748DE918",
"user_name": "cq04130007",
"name": "cq04130007",
"mobile": "+86-15204130007",
"email": "15204130007@example.com",
"first_name": "F",
"middle_name": "M",
"last_name": "L",
"employee_id": "041300071",
"external_id": "041300071",
"attr_city": "Wuhan",
"attr_nick_name": "cq04130007",
"attr_area": "CN",
"attr_gender": "male",
"attr_work_place": "Wuhan",
"attr_identity_type": "id_card",
"attr_identity_number": "420100199911111111",
"attr_manager_id": "20210601223953060-2AEC-D22770B77",
"attr_birthday": "1993-08-25 00:00:00.000",
"attr_user_type": "20211124152258971-9F54-3B43283CC",
"attr_hire_date": "2022-08-01 00:00:00.000",
"pwd_must_modify": false,
"disabled": false,
"locked": false,
"grade": 1,
"created_at": "2022-08-25 14:13:25.372",
"updated_at": "2022-08-25 14:37:24.610",
"last_login_ip": "120.46.143.105",
"last_login_at": "2024-06-06 15:14:28.000",
"user_org_relation_list": [
{
"org_id": "20220221173529886-B8BB-9F404BCDE",
"relation_type": 0
},
{
"org_id": "20210529172248496-D329-5748DE918",
"relation_type": 1
}
],
"extension": {}
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_msg": "User does not exist",
"error_code": "USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Return Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| user_id | User ID | String | |
| org_id | Organization ID | String | |
| user_name | Username | String | |
| name | Full Name | String | |
| mobile | Mobile Number | String | |
| String | |||
| first_name | First Name | String | |
| middle_name | Middle Name | String | |
| last_name | Last Name | String | |
| employee_id | Employee ID | String | |
| external_id | External System ID | String | |
| attr_gender | Gender | String | |
| attr_birthday | Birthday | String | |
| attr_nick_name | Nickname | String | |
| attr_identity_type | ID Type | String | |
| attr_identity_number | ID Number | String | |
| attr_area | Country/Region | String | |
| attr_city | City | String | |
| attr_manager_id | Direct Manager | String | Manager's User ID |
| attr_user_type | Personnel Type | String | Type ID |
| attr_hire_date | Hire Date | String | |
| attr_work_place | Work Location | String | |
| pwd_change_at | Password Change Time | String | |
| created_at | User Creation Time | String | |
| updated_at | User Modification Time | String | |
| last_login_ip | Last Login IP | String | |
| last_login_at | Last Login Time | String | |
| disabled | Disabled Status | String | |
| grade | Trust Level | Int | |
| locked | Locked | Boolean | |
| extension | Extended Attributes | JSONObject | |
| user_org_relation_list | User-Organization Relation List | List | |
| --job_id | Relation ID | String | |
| --org_id | Organization ID | String | |
| --relation_type | Relation Type | int | 1 for Belonging, 0 for Affiliation |
| jobs | User Position List | List | Returned when tenant enables position management |
| --job_id | Position ID | String | |
| --org_id | Organization ID | String | |
| --position_id | Post ID | String | |
| --title_id | Title ID | String | |
| --relation_type | Position Type | String | 1 for Primary Position, 0 for Part-time/Concurrent Position |
# Error Codes
| Status Code | Error Code | Error Message | Action |
|---|---|---|---|
| 400 | USER.0001 | 用户不存在 | 请检查对应用户是否存在 |
| User does not exist |
