Log In¶
Log in to the account with the user name and password.
If the current account has access to multiple OUs or needs to obtain the user’s Access Token for authentication after login, you need to call the Choose Organization API to select an OU later.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/login
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
account |
Required |
String |
The user name. |
password |
Required |
String |
The password of the user name. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
organizations |
IdNamePair Struct |
The list of OUs that the user has access to. See IdNamePair Struct for details. You can then use the Choose Organization API to select the OU. |
user |
IdNamePair Struct |
The information of the user. IdNamePair Struct >> |
accessToken |
String |
The access token. It is only used for subsequent selection of OUs via the Choose Organization API and cannot be used for user authentication. |
mfaType |
String |
The multi-factor authentication type of the user. |
IdNamePair Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The OU or user ID. |
name |
String |
The OU or user name. |
String |
The user’s email address. |
Error Code¶
Code |
Message |
Description |
---|---|---|
31400 |
The user name or password is wrong. |
User password is missing or not valid. |
31429 |
Attempt of accessing with incorrect password or IP reaches the limit. Please try again later. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/login
method: POST
requestBody:
{"account":"portal_demo","password":"Test1234"}
Return Sample¶
{
"code": 0,
"data": {
"accessToken": "your_access_token",
"mfaType": "NONE",
"organizations": [
{
"id": "your_org_id_1",
"name": "your_org_name_1"
},
{
"id": "your_org_id_2",
"name": "your_org_name_2"
}
],
"user": {
"id": "your_user_id",
"name": "your_user_name",
"email": "your_email"
}
},
"message": "OK"
}