Choose Organization

Select the organization that the user needs to use after login.

Request Format

POST https://{apigw-address}/app-portal-service/v2.1/session/set

Request Parameters (Header)

Name

Required or Not

Data Type

Description

Authorization

true

String

Access Token, represented as Bearer Token. Refer to Log In or Refresh Access Token to learn how to get Access Token.

Request Parameters (Body)

Name

Required or Not

Data Type

Description

orgId

true

String

Organization ID

Response Parameters

Name

Data Type

Description

data

data struct

Organization information

data Struct

Name

Data Type

Description

userId

String

User ID

userName

String

User name

currentOrgId

String

Current organization ID

currentOrgName

String

Current organization name

accessToken

String

Access Token in the request

refreshToken

String

New Refresh Token

refreshTokenExpire

String

Refresh Token expiration time in UTC format. For time formats, see ISO8601 Standard Time Formats Used by UTC

Sample

Request Sample

POST
https://{apigw-address}/app-portal-service/v2.1/session/set
headers: {"Authorization":"Bearer APP_PORTAL_S_TDKKeqfYBK3m5z3LRgKVqThWDYnRBN44"}
body:{"orgId":"yourOrgId"}

Return Sample

{
  "code": 200,
  "message": "",
  "data": {
    "userId": "yourUserId",
    "userName": "portal_demo",
    "currentOrgId": "yourOrgId",
    "currentOrgName": "Portal Demo",
    "accessToken": "APP_PORTAL_S_tsNqGkfWGj9AW6qSHADEW4wuxAHQN3dN",
    "refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1MTU1ODkzMTYxMDkwOTEiLCJhZG1pbkxldmVsIjoyLCJpc3MiOiJBUFAtUE9SVEFMIiwid29ya2luZ09yZ2FuaXphdGlvbklkIjoibzE1NTg5MzA4OTQ0NzgxIiwidXNlck5hbWUiOiJwb3J0YWxfZGVtbyIsIndvcmtpbmdPcmdhbml6YXRpb25OYW1lIjoiUG9ydGFsIERlbW8iLCJleHAiOjE1NzAwMTg5NTgsInVzZXJJZCI6InUxNTU4OTMxNjEwOTA5MSIsImlhdCI6MTU2NzQyNjk1OCwianRpIjoiand0X2lkIn0.Ql1vNVvb0ok2uWzzU1jiBzAyvRdBOkzzfnHD4PLsi1E",
    "refreshTokenExpire": 1570018958000
  }
}