Skip to main content

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.

ItemValue
MethodPOST
URLhttps://open.intl.palm.tencent.com/palm/openai/register_rgb_palm
Content-Typeapplication/json; charset=utf-8
AuthorizationBearer <api_key>
Default rate limit20 requests/sec

Request Parameters

ParameterRequiredTypeDescription
UserIdYesStringUnique user identifier, defined by you and unique within your application
RgbImageYesImageRGB palm image; Data and ImageType are required
IsForceNoBooleanWhether to overwrite an existing binding. true = overwrite; false (default) = return an error if already bound

Response Parameters (data)

ParameterTypeDescription
PalmIdStringPalmprint 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
PalmDirectionIntegerDetected 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 IsForce returns 2080007 (already bound) — a normal business result, not a system failure.