Help Center/ KooDrive/ API Reference/ API/ Session Management/ Initializing and Creating a Session
Updated on 2024-07-30 GMT+08:00

Initializing and Creating a Session

Function

Initialize and create a session.

URI

POST /koodrive/ose/v1/session/

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Traceid

No

String

Message log trace ID. The value contains 58 bits.

language

No

String

Language code, which complies with the internationalization specifications. For example, en-US indicates English (United States). English (United States) is used by default.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

code

Yes

String

Authorization code.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

String

Response code.

msg

String

Response information.

accessToken

String

Authorization code required by the service API.

userId

String

User ID.

userName

String

User account.

Example Requests

Request for initializing a session.

  POST /koodrive/ose/v1/session

{
    "code": FrbMohdqi86v6sMZlFSSuG3E0_9RsDpL08BlYfNQPhvibLET266cQhDI_WczEXJOAoIoKGCdqN2shKX1yfqrVci8nSFdMlxljNFhoffVvH93uSzIoyFxK4P7yhY6fDXa
}

Example Responses

Status code: 200

Session response information.

{
    "accessToken": Bearer+013b4daf12f4099a6eb74e2708000cb7a418409192f3e149,
    ,
    "userId": 369528171409614001,
    "userName": Tenant Administrator,
    "code": 0,
    "msg": "success"
}

Status Codes

Status Code

Description

200

Session response information.