Log In¶
Log in to the account.
Request Parameters (Body)¶
Name | Mandatory/Optional | Data Type | Description |
---|---|---|---|
account | Mandatory | String | The user name. |
password | Mandatory | String | The password of the user name. |
Response Parameters¶
Name | Data Type | Description |
---|---|---|
data | Data Struct | The details of the user. |
Data Struct¶
Name | Data Type | Description |
---|---|---|
organizations | Array of IdNamePair Structs | The list of organizations that the user belongs to. |
user | IdNamePair Struct | The ID and name of the user. |
accessToken | String | The access token, represented as bearer token. |
mfaType | String | The multi-factor authentication type of the user. |
IdNamePair Struct¶
Name | Data Type | Description |
---|---|---|
id | String | The organization/user ID. |
name | String | The organization/user name. |
String | The user email. |
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
{"account":"portal_demo","password":"yourPassword"}
method: POST
Return Sample¶
{
"code": 0,
"data": {
"accessToken": "your_access_token",
"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"
}
},
"message": "OK"
}