Skip to main content

CycurIDConfiguration

Overview:

CycurIDConfiguration is a class responsible for configuring the CycurID SDK for identity verification processes within applications. It provides a streamlined interface for setting up the necessary parameters, such as API key, secret key, and user ID, required for integrating the CycurID SDK into your application.

Usage:

To use CycurIDConfiguration, developers typically call its static method Configure(apiKey:secretKey:userId:completionHandler). This method allows developers to provide the necessary authentication credentials and a completion handler to handle the result of the configuration operation asynchronously.

Parameters:

  • apiKey: A string representing the API key provided by CycurID for authentication purposes.
  • secretKey: A string representing the secret key provided by CycurID for authentication purposes.
  • userId: A string representing the unique identifier for the user initiating the identity verification process.
  • completionHandler: A closure parameter that takes a Result enum as its argument. The Result enum indicates whether the configuration operation was successful or encountered an error. If successful, it provides an instance of CycurID for further interactions with the CycurID SDK.

Example :

    CycurIDConfiguration.Configure(this, "YOUR_API_KEY", "YOUR_SECRET_KEY", "USER_ID") {cycurid, error ->
if (cycurid != null) {
// Configuration successful, `cycurid` is now ready for use
cycurid.beginProcess(CycuridType.isHuman)
} else {
// Configuration failed, handle the error appropriately
Log.i("Error", "${error}")
}
}

Notes:

  • Ensure that the provided API key, secret key are obtained from CycurID and are valid for your application.
  • It's important to handle the configuration result appropriately, especially in the case of failure, to provide a smooth user experience and handle potential errors gracefully.