Method: projects.locations.collections.dataConnector.acquireAccessToken

使用以 dataConnector.acquireAndStoreRefreshToken 鑄造的每個使用者更新權杖,產生並傳回新的存取權杖及其詳細資料。如果快取中有存取權杖,則會從快取中取得。視需要輪替儲存的更新權杖,並使用使用者身分識別資訊傳回使用者專屬的存取權杖。不會傳回管理員設定的憑證。供動作執行和 UI 使用。

HTTP 要求

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:acquireAccessToken

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
name

string

這是必要旗標,要查詢權杖的連接器資源名稱。

要求主體

要求主體必須為空白。

回應主體

DataConnectorService.AcquireAccessToken 方法的回應訊息。

如果成功,回應主體會含有以下結構的資料:

JSON 表示法
{
  "refreshTokenInfo": {
    object (RefreshTokenInfo)
  },
  "accessToken": string
}
欄位
refreshTokenInfo

object (RefreshTokenInfo)

用於建立存取權杖的已儲存更新權杖相關資訊。

accessToken

string

建立的存取權杖。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite

詳情請參閱Authentication Overview

IAM 權限

需要 name 資源的下列 IAM 權限:

  • discoveryengine.dataConnectors.acquireAccessToken

詳情請參閱 IAM 說明文件