Completing Verification

To complete the verification you need to create a TrueProfile instance by passing the user's first and last name as defined above.

Please note that the first name and last name values to be passed in the above method call need to follow below mentioned rules :

  • The strings need to contains at least 1 alphabet, and cannot be completely comprised of numbers or special characters.

  • String length should be less than 128 characters.

  • First name is a mandatory field, last name can be empty ( but non nullable ).

TrueProfile profile = new TrueProfile.Builder(firstName, lastName).build();

Once you receive a callback in your VerificationCallback instance with the callbackType TYPE_MISSED_CALL_RECEIVED or TYPE_IM_OTP_RECEIVED , you can complete the verification process by calling the following method from within your activity :

//In case of Verification Callback TYPE_MISSED_CALL_RECEIVED

TcSdk.getInstance().verifyMissedCall(profile, verificationCallback)
//In case of Verification Callback TYPE_IM_OTP_RECEIVED

TcSdk.getInstance().verifyOtp(profile,otp,verificationCallback)

Please note that Truecaller SDK 3.1.0 is not by default enabled for the IM OTP flow. This new update is currently under early access. In case you want to enable it for your app, please drop in a request at developersupport@truecaller.com

Last updated