Configuration Options

The following properties are exposed as configuration options:

Required

  • authToken (string): Please see the authorization section for details on how to use this property. Not required if the apiKey and authEndpoint properties are used.

  • apiKey (string): Your API key as provided by Sybrin. Please see the authorization section for details on how to use this property. Not required if the authToken property is used.

  • authEndpoint (string): The endpoint that will be used to authorize. Only required when the integrationMode property is set to 0 (direct).

  • ocrEndpoint (string): The endpoint that will be used to execute OCR.

Optional

  • authBodyCallback (function): A callback function that may be used to modify the body of the authorization API call. As parameters, this function provides the body object before modification. The function expects the modified body object to be returned.

  • authHeadersCallback (function): A callback function that may be used to modify the headers of the authorization API call. As parameters, this function provides the headers object before modification. The function expects the modified headers object to be returned.

  • authHttpMethod (string: GET | POST | PUT): Overrides the HTTP method type for the authorization API call.

  • ocrBodyCallback (function): A callback function that may be used to modify the body of the OCR API call. As parameters, this function provides the body object before modification as well as a SnapshotData object. The function expects the modified body object to be returned.

  • ocrHeadersCallback (function): A callback function that may be used to modify the headers of the OCR API call. As parameters, this function provides the headers object before modification as well as a SnapshotData object. The function expects the modified headers object to be returned.

  • ocrHttpMethod (string: GET | POST | PUT): Overrides the HTTP method type for the OCR API call.

  • instructionTextPosition (string: top | bottom | topandbottom): Location of the instruction text while the video feed is being processed. The default value is "topandbottom".

  • maxUploadFileSize (integer): The maximum size, in bytes, that uploaded files may be. Default 5242880

  • mediaStreamRetryCount (integer): The number of times that the SDK must retry gaining access to the camera if it fails the first time.

  • mediaStreamRetryDelay (integer): The duration that the SDK must wait before retrying gaining access to the camera if it fails the first time.

  • mediaStreamStartTimeout (integer): The time (in milliseconds) that the SDK is given to enable and hook onto the user's camera before it times out. The default value is 6000.

  • takePictureDelay (number): The delay (in milliseconds) before the photo is taken. Default 5000.

  • useCutout (boolean): Sets whether or not the document cutout overlay must be displayed over the video feed. Default true.

  • translations ({ [key: string]: string }): An object literal representing a dictionary lookup that will be used for translating messages and prompts shown by the SDK. Please see the translations section on this page for a list of all translatable text, as well as the localization page for a detailed description on how to implement localization.