Title
Create new category
Edit page index title
Edit category
Edit link
Quick start
Quick start
Follow the step-by-step guide below for an understanding of the integration process. Additionally, you can refer to our API Reference or try out the Postman collection.
We have also documented a detailed integration guide here.
To begin, prepare the following request headers:
- Authorization: Bearer {{
YOUR_API_KEY}} - Content-Type: application/json
- Yoti-SDK-Id: {{
YOUR_SDK_ID}}
API Key and SDK ID can be found in Yoti Hub after finishing onboarding.
- "OVER": Check if the user's age exceeds the specific threshold
- "UNDER": Check if the user's age is below the specific threshold
- "AGE": Retrieve the user's estimated or exact age
This sets how long the session is valid. The user must complete it before ttl expires. Minimum is 60 secs; but we recommend 600 secs (1 min), and it can't exceed 1 month.
This example enables Age Estimation, Digital ID, and ID Verification (Doc Scan) methods in a single session by setting the corresponding method flags allowed to true, for checking if the user's age is over 18.
Configure the other parameters like callback URL, cancel URL, and notification URL (optional). Then send a POST request containing the headers and JSON request body to the session endpoint - https://age.yoti.com/api/v1/sessions
This will return the Session ID. See the example here.
Construct the service URL as follows:
https://age.yoti.com?sessionId=<sessionId>&sdkId=<sdkId>
Attach this URL to a button on your webpage or open it in a web browser to begin the session.
For launching a specific method directly, see the Fallback Flow documentation.
Obtain the session results by sending a GET request to this endpoint - https://age.yoti.com/api/v1/sessions/<sessionId>/result
This will return a JSON response body with the results. See the example here.
xxxxxxxxxx{ "type": "OVER", "ttl": 900, "age_estimation": { "allowed": true, "threshold": 21, "level": "PASSIVE" }, "digital_id": { "allowed": true, "threshold": 18, "age_estimation_allowed": true, "age_estimation_threshold": 21, "level": "NONE" }, "doc_scan": { "allowed": true, "threshold": 18, "authenticity": "AUTO", "level": "PASSIVE" }, "credit_card": { "allowed": false, "threshold": 18, "level": "NONE" }, "mobile": { "allowed": false, "threshold": 18, "level": "NONE" }, "reference_id": "over_18_example", "callback": { "auto": true, "url": "https://www.yoti.com" }, "notification_url": "https://yourdomain.example/webhook", "cancel_url": "https://www.yoti.com", "synchronous_checks": true}Got a question? Contact us here.