Skip to content

Consent

To use authorization services like Voice Recognition and Face Recognition we need to get the authorization consent from the end-user.

If the end-user does not agree, authorization services will not be processed.

Also note that the Face enroll and Voice enroll endpoints require a given authorization consent.

POST https://api.biometrysolutions.com/api-consent/consent
Headers
  • Authorization* - Your API Token.
Parameters
  • is_consent_given* (boolean) - Response of the end-user.
  • user_fullname* (string) - A unique identifier of the end-user that gives consent. We advise using a some sort of UUID instead of real names of your end users.
curl --location 'https://api.biometrysolutions.com/api-consent/consent' \
--header 'X-User-Fullname: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhbGciO...ANYea8r2xOG-Urc' \
--data '{
"is_consent_given": true,
"user_fullname": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'

Usage

To be able to use Authorization services you should pass X-User-Fullname Header in requests.

Example
curl --location 'https://api.biometrysolutions.com/api-gateway/enroll/face' \
--header 'X-User-Fullname: John Doe' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhbGciO...ANYea8r2xOG-Urc' \
--form 'face=@"[path_to_image_file]/face.png"

Storage consent is granted by users, allowing us to store their biometric data for future verification.

POST https://api.biometrysolutions.com/api-consent/strg-consent
Headers
  • Authorization* - Your API Token.
Parameters
  • is_consent_given* (boolean) - Response of the end-user to store their biometric data.
  • user_fullname* (string) - Full name of the end-user that gives consent to store their biometric data.
curl --location 'https://api.biometrysolutions.com/api-consent/strg-consent' \
--header 'X-User-Fullname: John Doe' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhbGciO...ANYea8r2xOG-Urc' \
--data '{
"is_consent_given": true,
"user_fullname": "John Doe"
}'

Retrieve the full consent history for an end-user, including both authorization consent and storage consent records.

GET https://api.biometrysolutions.com/api-consent/history
Headers
  • Authorization* - Your API Token.
Query Parameters
  • user_fullname* (string) - The unique identifier of the end-user whose consent history you want to retrieve.
Example
curl --location 'https://api.biometrysolutions.com/api-consent/history?user_fullname=3fa85f64-5717-4562-b3fc-2c963f66afa6' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhbGciO...ANYea8r2xOG-Urc'
Response
{
"data": {
"user_fullname": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"consent": {
"is_consent_given": true,
"history": [
{ "is_consent_given": true, "date": "2024-01-15T10:30:00Z" },
{ "is_consent_given": false, "date": "2024-06-01T14:00:00Z" }
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-06-01T14:00:00Z"
},
"storage_consent": {
"is_consent_given": true,
"history": [
{ "is_consent_given": true, "date": "2024-01-15T10:35:00Z" }
],
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:00Z"
}
}
}