Updated on 2023-10-09 GMT+08:00

Obtaining a Token

Function

Obtaining Token from Blockchain Browser through user name and password.

URI

GET /v2/agent/apis/tokens

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-User

Yes

String

Username.

X-Auth-Pass

Yes

String

Password.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

user

String

Username.

token

String

token

expire_time

Long

Expiration time.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error description.

error_msg

String

Error description.

Example Requests

GET https://192.168.0.90:30603/v2/agent/apis/tokens

Example Responses

Status code: 200

Success

{
  "user" : "admin",
  "token" : "ACiUxRlk2Jcu2d5bp2SyfP7abHV1nVKlo9Mm2AxI9dDN7mdHXXHBdg=kaIglHeZLTu6UeIu5YRcXTlpUPXylEG3ESNu0vIukrikG6SVhO393ds8rG+aRnZ+mMyookApP",
  "expire_time" : 1605867860701
}

Status code: 400

Bad Request

{
  "error_code" : "BCS.4000013",
  "error_message" : "request body is too large"
}

Status Codes

Status Code

Description

200

Success

400

Bad Request

Error Codes

See Error Codes.