Age Verification
Start age verification
The POST /v3/ftn/age-verification endpoint is used to start an age verification using FTN.
POST /v3/ftn/age-verification
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
{
"minAge": 18,
"maxAge": 100,
"callbackUrl": "https://...",
"redirectUrl": "https://...",
"refId": "12398698"
}
| Parameter | Required | Description |
|---|---|---|
| minAge | No1 | The minimum age (inclusive). This field can be null, indicating that there is no minimum. |
| maxAge | No1 | The maximum age (inclusive). This field can be null, indicating that there is no maximum. |
| callbackUrl | No | A URL where IDkollen will send a callback on successful or failed requests. |
| redirectUrl | No | A URL where IDkollen will redirect the user on successful or failed requests. |
| refId | No | Reference ID which will be included in a Collect and in the callback. |
1 Either minAge or maxAge, or both, must be provided.
Response:
IDkollen will respond with HTTP status 201 for successful request, or 4xx/5xx on errors. For more information about errors, please see the Errors section.
{
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "PENDING",
"url": "https://..."
}
| Property | Description |
|---|---|
| id | Authentication id, used to cancel or get the status of this age verification request. |
| refId | The refId given in the request, if any. |
| url | The URL where the end user can authenticate themselves. |
Fetch result
The GET /v3/ftn/age-verification/{{id}} endpoint is used to check the status of an age verification request.
NOTE: This endpoint is rate limited to one request per second.
GET /v3/ftn/age-verification/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
This endpoint will respond with a HTTP status of 404 if the age verification session has expired.
The status of an age verification can be either one of: PENDING, COMPLETED or FAILED.
Pending
{
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "PENDING",
"url": "https://..."
}
| Parameter | Description |
|---|---|
| refId | The refId given in the request, if any. |
| url | The URL where the end user can authenticate themselves. |
Completed
{
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "COMPLETED",
"ageVerified": true
}
| Parameter | Description |
|---|---|
| refId | The refId given in the request, if any. |
| ageVerified | true if the authenticated user matches the requested age, otherwise false. |
Failed
{
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "FAILED",
"error": "INVALID_ID"
}
| Parameter | Description |
|---|---|
| refId | The refId given in the request, if any. |
| error | An error code describing the reason for why the age verification failed. |
The error may be one of the following values:
| Code | Description |
|---|---|
| AUTH_FAILED | A generic code for any kind of failure. |
| CANCELLED | The age verification was cancelled either by the user or the partner. |
| INVALID_ID | The ID has expired or is otherwise invalid. |
| INTERNAL_ERROR | An internal error occurred causing the age verification to fail. |
| SESSION_TIMEOUT | The age verification expired or timed out. |
| UNSUPPORTED_CLIENT | The client used for the age verification is not supported. |
New error codes may be added in the future without prior notice. The partner should therefore handle unknown error codes in their implementations.
Cancel age verification
The DELETE /v3/ftn/age-verification/{{id}} endpoint is used to cancel an ongoing FTN age verification.
DELETE /v3/ftn/age-verification/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
IDkollen will respond with HTTP status 204 for successful request, or 4xx/5xx on errors. For more information about errors, please see the Errors section.