Skip to content
GBG Documents & Biometrics Documentation

Get started

This page takes you from nothing to a verified document in one call. The same pattern works for every IDscan Core endpoint.

  • 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: curl is used below.
  1. 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.

  2. Send the document. Call the VerifyDocument endpoint of the Document Verification service with the image as a multipart/form-data field. 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"

    DocumentImage is the picture of the document in normal light. SensorType says where the image came from: CAMERA, SCANNER or A4SCANNER. Every field is described on the VerifyDocument reference page.

  3. Read the result. A 200 response means the call succeeded, not that the document passed. The JSON body holds the result:

    Field What it tells you
    classificationInfo What the document is: the type, the issuing country and the confidence of the classification.
    extractionInfo The data read from the document, field by field.
    validationInfo The authentication checks that ran and whether each passed.
    documentScore The overall result of the verification.
    correlationId The reference you sent, echoed back.

    The VerifyDocument reference page lists every field of the response.

  4. 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.

  • The response status is 200 and the body is JSON with a correlationId equal to the one you sent.
  • classificationInfo names the document you sent.
  • A 400 means a field was missing or not valid; the errors list in the body says which. A 401 means the token was missing, expired or not valid for this service. See Requests and responses for every status code.
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.