Get started
This page demonstrates how to configure your account to use the SDK, as well as how to install and configure it in your project.
Before you begin
Before you start, make sure that your development environment meets the following requirements:
- Flutter Developer SDK installed;
Installation
Using Flutter CLI
Use the following command in flutter cli to add the SDK to your project:
$ flutter pub add unico_check
The command above adds the following line in your pubspec.yaml
file.
dependencies:
unico_check: ^2.0.2
The command flutter pub add unico_check
implicitly triggers command flutter pub get
. If package is not correctly installed, make sure that you have unico_check
in you pubspec.yaml
file, and manually run flutter pub get
.
Declare app permissions
In order to use user's camera, include the following user permissions in your app:
<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>
Including dependencies
Now you just need to correctly import the SDK into your project. You just need to import it in your Dart file.
import 'package:unico_check/unico_check.dart';
Get your credentials
- Log in to the Unico Customer Area;
- Go to Configurações (Configurations), then Integração (Integrations) and finally to API Key;
- Generate or edit an existing
API Key
; - If you want to use the Smartlive with interaction functionality in your app, check if the field "Utiliza liveness com interação" is enabled (this field must be showing you the word "SIM"). Otherwise, contact the support team to request the activation.
Learn more about Smartlive with interaction in the key concepts section.
- Select SIM (Yes) in the field "Utiliza autenticação segura na SDK" (Asking if use secure authentication in SDK);
- Expand the Android iOS section and add your Android application name and Bundle ID;
- Save your changes.
- Repeat the procedures 1 to 7 to create another key to your Android App.
GETTING CREDENTIALS
To use the Android SDK you need to obtain the SDK Key credential, a unique customer identification key generated by the Unico team.
- contact the CSs and/or Onboarding team.
- Request the SDK Key by entering the identifiers of your applications. Bundle Identifier for iOS, PackageID for Android and Host for WEB.
- The identifiers of your applications will be linked to the SDK Key by the Unico team.
- You receive your SDK Key to implement the AccessBioConfigDataSource.
Credentials (Client API Key) - Deprecated Method
To import the credentials (Client API Key) into your project, use the following guide:
- Access your instance with login and password;
- Scroll down the menu bar and click on the Settings menu, then click on the Integration menu and finally click on the API Key menu;
- To create an API Key click on + New API Key or to edit click under the desired API Key;
- If you want to use the FaceTec Proof of Life Selfie Camera mode, check that the Use liveness with interaction field is filled in with the YES option. If it is filled in with NO, or is not appearing, please contact the support through Help Center and request activation;
- In the Use secure authentication in SDK field, select the Yes option;
- Expand the Android SDK section, add the project ID and Package Name;
- Finally, click on Save;
- Go back to the APIKey section;
- Choose the API Key configured, in the Bundle column, click on the Download button;
- A new section will open, select the Android option;
- Click on Generate and automatically a new tab will open in your browser containing project information in JSON format;
- Save this JSON.
Learn more about Smartlive with Interaction here.
If in step 10 the tab does not open, please check if your browser is blocking pop-ups.
EMBARKING CREDENTIALS INTO YOUR PROJECT
To add the SDK Key to the project, implement the AccessBioConfigDataSource protocol in your class.
- Dart
final _configIos = UnicoConfig(
getBundleIdentifier: "Your BundleIdentifier Ios",
getHostKey: "Your HostKey Ios");
final _configAndroid = UnicoConfig(
getBundleIdentifier: "Your BundleIdentifier Android",
getHostKey: "Your HostKey Android");
void initUnicoCamera() {
_unicoCheck = new UnicoCheck(
listener: this,
unicoConfigIos: _configIos,
unicoConfigAndroid: _configAndroid);
}
Credentials (Client API Key) - Deprecated Method
- dart
final _configIos = UnicoConfig(
getProjectNumber: "Your ProjectNumber Ios",
getProjectId: "Your ProjectId Ios",
getMobileSdkAppId: "Your MobileSdkAppId Ios",
getBundleIdentifier: "Your BundleIdentifier Ios",
getHostInfo: "Your HostInfo Ios",
getHostKey: "Your HostKey Ios");
final _configAndroid = UnicoConfig(
getProjectNumber: "Your ProjectNumber Android",
getProjectId: "Your ProjectId Android",
getMobileSdkAppId: "Your MobileSdkAppId Android",
getBundleIdentifier: "Your BundleIdentifier Android",
getHostInfo: "Your HostInfo Android",
getHostKey: "Your HostKey Android");
void initUnicoCamera() {
_unicoCheck = new UnicoCheck(
listener: this,
unicoConfigIos: _configIos,
unicoConfigAndroid: _configAndroid);
}
Getting help
Are you missing something or still need help? Please, please get in touch with the support team at help center.
Next steps
- Learn how to capture selfies with the SDK.
- Learn how to capture image of documents with the SDK.
- Learn more about the SDK in the Reference documentation.
- Check the REST APIs documentation.