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 |
IdNamePair Struct¶
Name | Data Type | Description |
---|---|---|
id | String | The organization/user ID |
name | String | The organization/user name |
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": "APP_PORTAL_S_WX89rC4pqsMc478tyP6gb9zFmT9qYaW7",
"organizations": [
{
"id": "yourOrgId_1",
"name": "Portal Demo"
},
{
"id": "yourOrgId_2",
"name": "rm_0726_001"
}
],
"user": {
"id": "yourUserId",
"name": "portal_demo"
}
},
"message": ""
}