DuliDuli Open Platform
EN
简体中文
繁體中文
English
Quick Start APIs DuliDuli Official Website
模板

[AccessToken]


When a third-party application initiates an API call, it must include the AccessToken parameter. The AccessToken parameter is obtained using the EnterpriseID, AppID, and AppSecret.

The specific steps are as follows:

  1. Log in to the admin backend as an organization administrator, navigate to the Open Platform -- Access Provider Management, and obtain the EnterpriseID, AppID, and AppSecret information;
  2. Obtain the AccessToken using the EnterpriseID, AppID, and AppSecret;
  3. Use the AccessToken to call relevant APIs.

Obtaining AppID & AppSecret

Log in to the management backend, then navigate to the Open Platform -- Access Provider Management to add a new access provider. After successful creation, you can find the corresponding application in the list. Clicking on it will pop up an information box displaying the AppID and AppSecret.

Get AccessToken

Request

Obtain an AccessToken by calling the following interface using EnterpriseId, AppID, and AppSecret:

POST http://[SERVER:9022]/v1/access_token

The actual API endpoint address will depend on the deployment environment.

Headers

Headers

Desc

Content-Type

application/json

Parameters

json

{
"enterprise_id": "$enterprise_id",
"app_id": "$app_id",
"app_secret": "$app_secret"
}

Parameters

Type

Description

enterprise_id

String

Enterprise ID

app_id

String

Provider ID

app_secret

String

Provider Secret

Return

json

{
"code": 1,
"message": "ok",
"data": {
"access_token": "7sx34344de4d55879ce1e441a101c4",
"expire_time": 1487456719965,
"app_id": "xxxxx",
}
}

Return Fields

Fields

Type

Description

access_token

String

Identity

expire_time

String

Expiration Time of access_token

app_id

String

Current Access Provider ID

Error Codes

code

message

Description

100020

invaild enterprise id

invaild enterprise id

100021

invaild app id

invaild app id

100022

invaild app secret

invaild app secret