Get App User List¶
Based on the accessKey
of an application, get the list of users who have access to the application.
Operation Permissions¶
User login to Application Portal is required.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/user/list
Request Parameters (Header)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Mandatory |
String |
The access token (or bearer token). Refer to Log In or Refresh Access Token to learn how to get the access token. |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
pagination |
Optional |
Pagination Request Struct |
Lists the paging requirements in a request. If not specified, the default pagination size is 1000 pages, starting from 0. For more details, see Pagination Request Struct |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Data Struct |
The pagination and list of the users’ information. |
Data Struct¶
Name |
Data Type |
Description |
---|---|---|
pagination |
Pagination Struct |
The pagination information. |
users |
APIUserDTO Struct |
The list of the users’ information. |
APIUserDTO Struct¶
Name |
Data Type |
Description |
---|---|---|
userId |
String |
User ID. |
String |
The user’s registered email address. |
|
phoneArea |
String |
The area code of the user’s registered phone number. |
phone |
String |
The user’s registered phone number. |
name |
String |
User name. |
Error Code¶
Code |
Description |
---|---|
31401 |
The provided access token is not valid. |
31403 |
OU administrator permission is required. |
Sample¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/list
method: POST
requestBody:
{
"pagination":{
"pageSize":1000,
"pageNo":0
}
}
Return Sample¶
{
"code": 0,
"message": "",
"data": {
"pagination":{
"totalElements":15000,
"pageSize":1000,
"pageNo":0
},
"users": [
{
"userId": "u15665532373241",
"email": "1123456666@Fsn.sg",
"phoneArea": "",
"phone": "",
"name": "1123456666@Fsn.sg"
},
{
"userId": "u15665405431611",
"email": "1qaz@ws.sx",
"phoneArea": "",
"phone": "",
"name": "1qaz"
}
]
}
}
Java SDK Sample¶
public class AppPortalSdkTest{
@Test
public void getAppUserList() {
AppUserListRequest appUserListRequest = new AppUserListRequest("your_access_token");
AppUserListResponse appUserListResponse = Poseidon.config(PConfig.init().appKey("your_access_key").appSecret("your_secret_key").debug())
.url("https://{apigw-address}").getResponse(appUserListRequest, AppUserListResponse.class);
System.out.println("App User List res: " + JSON.toJSONString(appUserListResponse));
assertNotNull("Response should not be null", appUserListResponse);
assertNotNull("Response data should not be null", appUserListResponse.data);
assertNotNull("App users could not be null", appUserListResponse.data.users);
assertNotNull("user name could not be null", appUserListResponse.data.users.get(0).name);
}
}