Get started
This page takes you from nothing to a verified document in one call. The same pattern works for every IDscan Core endpoint.
Before you start
Section titled “Before you start”- An IDscan Core account and credentials from GBG. Your GBG contact sets these up and sends you the IDscan Core Authentication Guide, which explains how to obtain a token with them.
- The region you were set up in, EU or US. The base addresses are in Requests and responses.
- An image of an identity document to test with: a clear, well-lit photograph of the front of a passport, driving licence or ID card, as a JPEG or PNG. Use a test document, never a real customer’s.
- A way to send HTTP requests:
curlis used below.
-
Get a token. Follow the IDscan Core Authentication Guide to obtain a JSON Web Token for your account. Keep it on your server, never in a browser or a mobile app. See Authentication.
-
Send the document. Call the
VerifyDocumentendpoint of the Document Verification service with the image as amultipart/form-datafield. Replace the token, and the file name, with your own:Terminal window curl -X POST "https://verification-v2-eu.core.idscan.cloud/VerifyDocument" \-H "Authorization: Bearer <your token>" \-H "x-correlation-id: test-0001" \-F "DocumentImage=@passport-front.jpg" \-F "SensorType=CAMERA"DocumentImageis the picture of the document in normal light.SensorTypesays where the image came from:CAMERA,SCANNERorA4SCANNER. Every field is described on the VerifyDocument reference page. -
Read the result. A
200response means the call succeeded, not that the document passed. The JSON body holds the result:Field What it tells you classificationInfoWhat the document is: the type, the issuing country and the confidence of the classification. extractionInfoThe data read from the document, field by field. validationInfoThe authentication checks that ran and whether each passed. documentScoreThe overall result of the verification. correlationIdThe reference you sent, echoed back. The VerifyDocument reference page lists every field of the response.
-
Go on from there. Verify the back of the document, check that the person is live from a selfie, and match the selfie to the document portrait. Each is one call with the same shape as the one above.
Check it worked
Section titled “Check it worked”- The response status is
200and the body is JSON with acorrelationIdequal to the one you sent. classificationInfonames the document you sent.- A
400means a field was missing or not valid; theerrorslist in the body says which. A401means the token was missing, expired or not valid for this service. See Requests and responses for every status code.
Troubleshooting
Section titled “Troubleshooting”| You see | Do this |
|---|---|
401 Unauthorized |
Get a fresh token; check it was sent as Authorization: Bearer <token> and that it is for the region you are calling. |
400 with errors in the body |
Read the errors list: a required field is missing or a value is not allowed. Check the field names against the reference page; they are case-sensitive. |
503 |
The service is temporarily out of capacity. Wait and retry. |
500 |
Contact GBG support with the correlationId from the response. |