跳到主要內容

驗證 API Key

GET/whoami

驗證 API Key,並回傳目前帳戶識別碼與 API 服務版本。

驗證

請求標頭攜帶 Authorization: Bearer <API_KEY>。API Key 的可存取資源由目前授權範圍決定。

請求​

Base URL:https://api.bluehola.com

回應​

狀態碼說明
200OK
4xx用戶端錯誤

200 回應 Schema​

{
"type": "object",
"additionalProperties": true,
"required": [
"tenantId",
"customerEntityId",
"platformVersion"
],
"properties": {
"tenantId": {
"type": "string",
"description": "目前 API Key 對應的帳戶識別碼"
},
"customerEntityId": {
"type": ["string", "null"],
"description": "客戶 API Key 綁定的客戶主體 ID;其他憑證為 null。可用於篩選 Business Portfolio、WABA 與業務號碼清單。"
},
"platformVersion": {
"type": "string",
"description": "處理本次請求的 API 程序版本"
}
}
}

通用錯誤信封及處理建議見錯誤代碼。

補充說明​

這是無副作用的憑證檢核端點。tenantId 用於確認目前 API Key 對應的帳戶,platformVersion 僅表示目前 API 程序版本。回應可能包含額外診斷欄位;客戶整合不應依賴這些欄位判斷權限。

客戶 Key 可將 customerEntityId 用於篩選 Business Portfolio、WABA 和業務號碼清單;其他憑證回傳 null。