Obtain EUID
Last updated:2025-03-18
EUID is the unique user ID of the EngageLab MA platform. You can use the following API to obtain the EUID based on the user identifier.
Invocation Address
POST /v1/user/register
Invocation Verification
The EngageLab REST API uses the verification method of HTTP Basic Authentication: Add Authorization to the HTTP Header:
Authorization: Basic ${base64_auth_string}
Authorization: Basic ${base64_auth_string}
This code block in the floating window
The generation algorithm for the above base64_auth_string is: base64(api_key:api_secret)
- The header name is "Authorization", and the value is the base64-converted "username:password" pair (with a colon in the middle).
- In the scenario of the MA API, the username is the APIKey, and the password is the APISecret. Please add a data source of the API type in the data source to obtain the APIKey and API Secret.
Request Example
Request Header
> POST /v1/user/register
> Content-Type: application/json
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
> POST /v1/user/register
> Content-Type: application/json
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
This code block in the floating window
Request Body
{
"identity_name":"user_id", // User identifier name
"identity_values": [
"18012345678", // User identifier value
"18012345678"
]
}
{
"identity_name":"user_id", // User identifier name
"identity_values": [
"18012345678", // User identifier value
"18012345678"
]
}
This code block in the floating window
Request Parameters
Field | Type | Required | Description |
---|---|---|---|
identity_name | String | Yes | User identifier name, supports passing values such as user_id, anonymous_id, registration_id |
identity_values | list | Yes | Values of user identifiers, supporting up to 100 values, and each value cannot exceed 256 characters |
Return Parameters
Field | Type | Required | Description |
---|---|---|---|
code | Int | Yes | Indicates whether the interface call is successful. 0 means successful or partially successful, and other values represent failure |
message | String | Yes | Description of the interface call result, an explanation of the return code |
data | Array | No | A list of EUIDs corresponding to the user identifiers returned |
identity_value | String | Yes | The value of the user identifier |
euid | Long | Yes | The corresponding unique user ID of EngageLab MA |
error_code | Int | Yes | Indicates whether the EUID is successfully obtained. 0 represents success, and other values represent failure |
All Successful
{
"code": 0,
"message": "success",
"data": [
{
"identity_value": "18012345678", // User identifier value
"euid": 10362473, // Generated EUID, null if the acquisition fails
"error_code": 0 // Corresponding error code, 0 for success, and not empty for failure, such as 40006
},
{
"identity_value": "18012340000",
"euid": 10362474,
"error_code": 0
}
]
}
{
"code": 0,
"message": "success",
"data": [
{
"identity_value": "18012345678", // User identifier value
"euid": 10362473, // Generated EUID, null if the acquisition fails
"error_code": 0 // Corresponding error code, 0 for success, and not empty for failure, such as 40006
},
{
"identity_value": "18012340000",
"euid": 10362474,
"error_code": 0
}
]
}
This code block in the floating window
All Failed
{
"code": 55101,
"message": "Exceeded the limit of user identifiers"
}
{
"code": 55101,
"message": "Exceeded the limit of user identifiers"
}
This code block in the floating window
Partially Successful
{
"code": 0,
"message": "success",
"data": [
{
"identity_value": "18012345678", // User identifier value
"euid": null, // null for failure
"error_code": -1 // Corresponding error code, 0 for success, and not empty for failure
},
{
"identity_value": "1801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400008012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000",
"euid": null,
"error_code": 55105
}
]
}
{
"code": 0,
"message": "success",
"data": [
{
"identity_value": "18012345678", // User identifier value
"euid": null, // null for failure
"error_code": -1 // Corresponding error code, 0 for success, and not empty for failure
},
{
"identity_value": "1801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400008012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000",
"euid": null,
"error_code": 55105
}
]
}
This code block in the floating window