- Documentation
 - User Authentication
 - Log In via Authorization Code
 
Log In via Authorization Code¶
Log in with a Single Sign-On (SSO) authorization code.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/loginViaCode
Request Parameters (URI)¶
Name  | 
Location (Path/Query)  | 
Required/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|---|
channel  | 
Query  | 
Optional  | 
String  | 
Login source. Supports the following values: 
 If you need to customize other login sources, contact your system administrator.  | 
Request Parameters (Body)¶
Name  | 
Required/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|
code  | 
Required  | 
String  | 
The authorization code.  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
organizations  | 
IdNamePair Struct  | 
The list of OUs that the user has access to. See IdNamePair Struct for details.  | 
user  | 
IdNamePair Struct  | 
The ID and name of the user. IdNamePair Struct >>  | 
IdNamePair Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
id  | 
String  | 
The OU or user ID.  | 
name  | 
String  | 
The OU or user name.  | 
Error Code¶
Code  | 
Description  | 
|---|---|
31400  | 
Invalid authorization code.  | 
31429  | 
Accessing with incorrect password or IP attempt limit reached.  | 
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": {
    "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"
}