協力廠商應用主動調用介面時,需帶上AccessToken參數。 AccessToken參數由EnterpriseID,AppID,AppSecret獲取。
具體需要以下步驟:
1.以組織管理員身份登入後臺--開放平臺--接入商管理,並獲取EnterpriseID,AppID及AppSecret等資訊;
2.通過EnterpriseID,AppID及AppSecret獲取AccessToken;
3.通過AccessToken調用相關介面。
獲取AppID & AppSecret
登入管理後臺並登入後臺--開放平臺--接入商管理新增接入商。 創建成功後,可以在清單,找到對應的應用,點擊會彈出下圖的資訊框,AppID及AppSecret。

請求說明
通過EnterpriseId,AppID,AppSecret調用以下介面獲取AccessToken:
實際API介面地址,以部署環境為准。
請求頭部
請求頭 | 說明 |
Content-Type | application/json |
請求參數
json
參數 | 類型 | 說明 |
enterprise_id | String | 企業編號 |
app_id | String | 接入商ID |
app_secret | String | 接入商金鑰 |
返回結果示例
json
結果欄位說明
字段 | 类型 | 說明 |
access_token | String | 身份憑證 |
expire_time | String | access_token的過期時間 |
app_id | String | 當前接入商ID |
状态码說明
code | message | 說明 |
100020 | invaild enterprise id | 無效的企業ID |
100021 | invaild app id | 無效的接入商 |
100022 | invaild app secret | 無效的金鑰 |