Get CUID API
In the Operation Growth platform, CUID is used as the unique platform user ID. You can create a user identifier for your own system in Data Center -> User Asset Management -> One ID, and enable uniqueness to establish a one-to-one mapping with CUID.
With the API below, you can exchange a user identifier for a CUID.
Obtaining a CUID through the API must be based on a user identifier, and that user identifier must already exist in the data center of the Operation Growth platform.
Note: The user identifier used to obtain a CUID must be set as priority 1 in ID Mapping. Otherwise, the Operation Growth platform cannot map the user identifier from your own system to CUID one-to-one.
Request Method
POST
Request URL
POST https://growth.jiguang.cn/smartop/api/v1/user/register
QPS Limit
QPS <= 100
Request Headers
> Content-Type: application/json
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
Request Body Parameters
The API supports obtaining a single CUID or multiple CUIDs in one request. When obtaining multiple CUIDs, the number of identityValues must be <= 100.
In real business scenarios, do not include comments. The comments in the following example are only to help developers understand parameter meanings.
{
"identityName":"phone_test", // User identifier name
"identityValues": [
"18012345678", // User identifier value
"18012345678"
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| identityName | String | Yes | User identifier name. It can be used to customize the user identifier of your own system. |
| identityValues | list | Yes | User identifier values. Up to 100 values are supported, and each value cannot exceed 256 characters. |
- The user identifier name must be created on the platform in advance. Developers are advised to view the user identifier list first, then configure the corresponding user identifier values.
- If the number of values exceeds the limit, or if any value exceeds the character limit, the request will fail.
Response Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| code | Int | Yes | Whether the API call succeeded. 0 indicates success, and other values indicate an error. |
| msg | String | Yes | API call result description, with a text explanation of the error code. |
| data | Array | No | CUID list |
| identityValues | String | Yes | User identifier value |
| cuid | Long | Yes | Corresponding unique user ID of the Operation Growth platform |
| errorCode | Int | Yes | Whether the CUID was obtained successfully. 0 indicates success, and other values indicate an error. |
Successful Response
{
"code": 0,
"msg": "ok",
"data": [
{
"identityValue": "18012345678", // User identifier value
"cuid": 10362473, // Generated corresponding cuid value. null on failure.
"errorCode": 0 // Corresponding error code. 0 on success; non-empty on failure, such as 40006.
},
{
"identityValue": "18012340000",
"cuid": 10362474,
"errorCode": 0
}
]
}
Failed Response
Single error response:
{
"code": 40006,
"msg": "用户标识不存在"
}
Multiple error response:
{
"code": 0,
"msg": "ok",
"data": [
{
"identityValue": "18012345678", // User identifier value
"cuid": null, // null on failure
"errorCode": -1 // Corresponding error code. 0 on success; non-empty on failure.
},
{
"identityValue": "18012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000080123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000180123400001801234000018012340000",
"cuid": null,
"errorCode": 40006
}
]
}
Error Codes
| Error Code | Description | Solution |
|---|---|---|
| 4009 | API authentication failed | Confirm whether the project ID and project secret are correct. |
| 40004 | User identifier is empty | Confirm whether the user identifier value in the request body is empty. |
| 40005 | User identifier does not exist | Confirm whether the user identifier has been created in the Operation Growth platform. |
| 40006 | User identifier value cannot exceed 256 characters | Confirm whether the user identifier value exceeds 256 characters. |
| 40011 | Number of user identifiers exceeds the limit | Confirm whether the number of user identifier values exceeds 100. |
| -1 | Internal server error | Contact Jiguang technical support. |