查詢 EUID
您可以使用此介面根據專案中已設定的使用者識別查詢現有使用者的 EUID。本介面只讀取現有使用者資料,識別未匹配時不會建立使用者或產生新的 EUID。此介面按專案維度限流:每分鐘最多 1000 次請求,超出時返回 HTTP 429 及錯誤碼 55110。
調用地址
POST /v1/user/euid
調用驗證
EngageLab REST API 採用 HTTP 基本認證:
Authorization: Basic ${base64_auth_string}
Authorization: Basic ${base64_auth_string}
此代碼塊在浮窗中顯示
base64_auth_string 的生成算法為 base64(api_key:api_secret)。
請求示例
{
"identity_name": "user_id",
"identity_values": ["user-1", "user-2"]
}
{
"identity_name": "user_id",
"identity_values": ["user-1", "user-2"]
}
此代碼塊在浮窗中顯示
請求參數
| 欄位 | 類型 | 必填 | 描述 |
|---|---|---|---|
| identity_name | String | 是 | 專案中已設定的使用者識別名稱。 |
| identity_values | Array |
是 | 使用者識別值,支援 1 至 100 個,每個值不超過 256 個字元。 |
返回參數
| 欄位 | 類型 | 描述 |
|---|---|---|
| code | Int | 0 表示調用成功,即使部分識別未匹配。 |
| message | String | 返回結果描述。 |
| data | Array | 按請求值順序返回查詢結果。 |
| identity_value | String | 請求中的使用者識別值。 |
| euid | Long | 現有使用者的 EUID,未匹配時為 null。 |
| error_code | Int | 查詢成功為 0;未匹配時也返回 0,因為不會建立使用者。 |
返回示例
{
"code": 0,
"message": "success",
"data": [
{"identity_value": "user-1", "euid": 10362473, "error_code": 0},
{"identity_value": "user-not-found", "euid": null, "error_code": 0}
]
}
{
"code": 0,
"message": "success",
"data": [
{"identity_value": "user-1", "euid": 10362473, "error_code": 0},
{"identity_value": "user-not-found", "euid": null, "error_code": 0}
]
}
此代碼塊在浮窗中顯示
錯誤碼
| 錯誤碼 | 描述 |
|---|---|
| 40050 | 介面鑑權失敗。 |
| 55004 | 業務參數不合法。 |
| 55101 | 使用者識別數量超過 100 個。 |
| 55105 | 使用者識別值超過 256 個字元。 |
| 55106 | 使用者識別名稱未在專案中設定。 |
| 55107 | 使用者識別名稱或值為空。 |
| 55110 | 請求頻率超限(每分鐘最多 1000 次,按專案維度)。 |










