Register RGB Palmprint
Upload an RGB palm image to create a palmprint and bind it to a user. Used for first-time enrollment. Single-factor authentication.
| Item | Value |
|---|---|
| Method | POST |
| URL | https://open.intl.palm.tencent.com/palm/openai/register_rgb_palm |
| Content-Type | application/json; charset=utf-8 |
| Authorization | Bearer <api_key> |
| Default rate limit | 20 requests/sec |
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
UserId | Yes | String | Unique user identifier, defined by you and unique within your application |
RgbImage | Yes | Image | RGB palm image; Data and ImageType are required |
IsForce | No | Boolean | Whether to overwrite an existing binding. true = overwrite; false (default) = return an error if already bound |
Response Parameters (data)
| Parameter | Type | Description |
|---|---|---|
PalmId | String | Palmprint ID bound to the user. If the user already has a palmprint, the existing record is updated in place (PalmId unchanged) and the registered PalmId is returned |
PalmDirection | Integer | Detected palm side, see PalmDirectionType |
Example
Request
POST /palm/openai/register_rgb_palm HTTP/1.1
Host: open.intl.palm.tencent.com
Content-Type: application/json; charset=utf-8
Authorization: Bearer ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
"UserId": "user001",
"RgbImage": {
"Data": "base64encodedRgbImageData...",
"ImageType": 1
},
"IsForce": false
}
Response
{
"code": 0,
"message": "ok",
"requestId": "4d5912a82af144f8a982c2da031c1035",
"data": {
"PalmId": "8db884f9-1fb8-44f5-bdaa-f98fdcb3cd47",
"PalmDirection": 1
}
}
cURL
curl -X POST "https://open.intl.palm.tencent.com/palm/openai/register_rgb_palm" \
-H "Content-Type: application/json; charset=utf-8" \
-H "Authorization: Bearer ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"UserId": "user001",
"RgbImage": {
"Data": "'"$(base64 -w0 palm.jpg)"'",
"ImageType": 1
},
"IsForce": false
}'
Notes
- Each successful registration counts toward your application's palmprint capacity. When full, the API returns
2080014(palm capacity full) — contact the official team to request an expansion, or delete historical palmprints first. - A duplicate registration without
IsForcereturns2080007(already bound) — a normal business result, not a system failure.