Token Authentication – GBG IDscan Documentation

Token Authentication

To use authentication token, you need to use Request builder as base.

Java

EnterpriseService enterprise = new EnterpriseService(getApplicationContext()); enterprise.setBaseUrl("Base URL");
RequestDocumentSend requestDocumentSend = new RequestDocumentSend(); requestDocumentSend.setDocumentImage(bitmap); requestDocumentSend.setCredentials(new Credentials("User", "Password")); enterprise.submitDocument(requestDocumentSend, onDocumentSubmittedListener);

Replace default username and password credentials constructor to empty one and add setter for token.

Java

requestDocumentSend.setCredentials(new Credentials().setToken("TOKEN"));

Kotlin Example of adding token.

val enterpriseService = EnterpriseService.Builder(this)
.baseUrl(baseUrl)
.token("token")
.build()

Note: Android MJCS does not provide alternative token retrieval methods; please consult with your Technical Account Manager (supportcase@idscan.com).

Was this page helpful?