Log In via Authorization Code¶
Log in to Application Portal by using the Single Sign-On authorization code.
Request Parameters (Query)¶
Name | Mandatory/Optional | Data Type | Description |
---|---|---|---|
channel | Optional | String | Login source. |
Request Parameters (Body)¶
Name | Mandatory/Optional | Data Type | Description |
---|---|---|---|
code | Mandatory | String | The authorization code. |
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. |
IdNamePair Struct¶
Name | Data Type | Description |
---|---|---|
id | String | The organization/user ID. |
name | String | The organization/user name. |
Error Code¶
Code | Description |
---|---|
31400 | Invalid authorization code. |
31429 | Accessing with incorrect password or IP attempt limit reached. Please try again later. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/loginViaCode?channel=web
method: POST
requestBody:
{"code":"authorizationCode"}
Return Sample¶
{
"code": 0,
"data": {
"accessToken": "your_token",
"organizations": [
{
"id": "your_org_id",
"name": "your_org_name"
},
{
"id": "your_org_id_2",
"name": "your_org_id_2"
}
],
"user": {
"id": "your_user_id",
"name": "your_user_name"
}
},
"message": "OK"
}