Skip to main content

The QitechDeviceScan object

Important Note!

As of version 1.0.0, the authentication system has been updated to use a temporary token instead of mobileToken. The token is obtained by making a server-to-server request to the Device Scan API.

Request

To use the Device Scan plugin, you must call the startDeviceScan method, which has the following parameters:

Version 1.0.0+

ParameterTypePurposeRequired
tokenStringTemporary authentication token obtained by making a request to the Device Scan API. Must be generated using the same sessionId passed to this method.Yes.
environmentCaaSEnvironmentEnum used to configure the runtime environment as sandbox or production.Yes.
sessionIdStringKey that identifies the session from which the collected data originates. Must be sent in lowercase.Yes.
eventTypeStringAn enum that defines the type of event being reported — care is requested so that very similar events are reported with the same enum, so that intelligence can be built on top of this data.Yes.
eventIdStringAn identifier of the event being reported.Yes.
documentNumberString?The user's document number, if available. (CPF/CNPJ without dots, dashes, and slash). Can be omitted.No.

Previous Versions (up to 0.x)

ParameterTypePurposeRequired
mobileTokenStringCustomer key that identifies that the collected data comes from your application. If you have not yet received your mobile-token, contact support.Yes.
environmentCaaSEnvironmentEnum used to configure the runtime environment as sandbox or production.Yes.
sessionIdStringKey that identifies the session from which the collected data originates. Must be sent in lowercase.Yes.
eventTypeStringAn enum that defines the type of event being reported — care is requested so that very similar events are reported with the same enum, so that intelligence can be built on top of this data.Yes.
eventIdStringAn identifier of the event being reported.Yes.
documentNumberString?The user's document number, if available. (CPF/CNPJ without dots, dashes, and slash). Can be omitted.No.

Quick Reference (Migration)

  • 1.0.0+: use temporary token obtained via API (token: token)
  • < 1.0.0: use static mobileToken (mobileToken: '<MOBILE_TOKEN_SENT_BY_QITECH>')
  • In both: environment, sessionId, eventType, and eventId are required. documentNumber is optional.

Return value

The method returns a String to indicate success or failure during information collection:

Success

Success collecting device scan data

Error

Device Scan fail. Check token, environment and permissions