Updated on 2025-03-31 GMT+08:00

C1 System Configuration Interface Authentication

Scenario

The API Fabric generates a token.

URL: https://Domain Address/apigovernance/api/oauth/tokenByAkSk

Replace Domain Address with the actual address or domain name of the CEC.

For example, replace Domain Address with service.besclouds.com in the production environment of the Huawei public cloud. Then, the URL is https://service.besclouds.com/apigovernance/api/oauth/tokenByAkSk.

Interface Method

POST

Request Header

{

Content-Type: application/json

X-Token-Expire:600

}

X-Token-Expire indicates the token expiration time, in seconds. In this example, the token expiration time is 600 seconds. The maximum value is 3600.

Request Parameters

{

"app_key": "xxxxxxxxxxxxxxxx",

"app_secret": "yyyyyyyyyyyyyyyyyy"

}

  • app_key indicates the app ID. Contact operations personnel to obtain it.
  • app_secret indicates the secret. Contact operations personnel to obtain it.

Response Parameters

{

"AccessToken": "zzzzzzzzzzzzzzzzzz",

"ApplyType": "Bearer",

"CreateTime": "1545650171",

"Expires": "600",

"Scope": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",

"AppKey": "xxxxxxxxxxxxxxxxx",

"UserID": "Anonymous"

}

AccessToken indicates the token of the API.