查询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 次,按项目维度)。 |










