Truecaller SDK
  • Hello!
  • Why Truecaller SDK
  • Getting Started
  • ANDROID
    • 🆕OAuth SDK 3.0
      • Implementing user flow for your App
      • Scenarios for all user verifications : Truecaller and Non Truecaller Users
      • Integration Steps
        • Generating Client ID
        • Setup
        • Implementing Callbacks
        • Initialisation
        • Setting up OAuth parameters
        • Invocation
        • Customisation
        • Clearing SDK Instance
        • Handling Error Scenarios
        • Integrating with your Backend
          • Fetching User Token
          • Fetching User Profile
        • Non Truecaller User Verification
          • Completing Verification
          • TrueException
          • Server Side Validation
      • Instrumentation
      • Getting Release Ready
        • Testing your verification flow
          • Non-Truecaller user verification flow
          • Truecaller user verification flow
          • Test Setup
        • Google play store app permission declaration form
        • Moving to Production
    • SDK v2.8.0
      • Implementing user flow for your app
      • Scenarios for all user verifications : Truecaller and Non Truecaller Users
      • Generating App Key
      • Integrating with your App
        • Setup
        • App Key Configuration
        • Initialisation
        • Customisation
        • Implement Callbacks
        • Clearing SDK instance
        • Handling Error Scenarios
        • Verifying non Truecaller users
          • TrueException
          • Completing Verification
        • Advanced Steps
      • Server Side Response Validation
        • For Truecaller users verification flow
        • For Non-Truecaller users verification flow
      • Instrumentation
      • Getting Release Ready
        • Testing your verification flow
          • Truecaller user verification flow
          • Non-Truecaller User Verification Flow
          • Test Setup
        • Google Play App Signing
        • Google Play Store app permissions declaration
        • Google Play Policy Change for Device Identifiers
      • Changelog
  • MOBILE WEBSITES
    • Implementing user flow for your Mobile Website
    • Generating App Key
    • Integrating with your mobile website
      • Initialisation
      • Invoking verification
      • Fetch User Profile
      • Completing User Verification
      • Handling Error Scenarios
    • Getting Release Ready
      • Instrumentation
      • Testing your verification flow
  • IOS
    • Generating App Key
    • Integrating with your iOS App
      • Setup
      • Configuration
      • Usage
        • Swift
        • Objective-C
      • Verifying Non-Truecaller app users
        • Completing Verification
      • Handling Error Scenarios
        • Safari Redirection
    • Server Side Response Validation
  • SHOPIFY APP
    • Generating App Key
    • App Configuration
    • Deactivating App Block
  • FAQs
    • General
    • Developer Account
    • Android App SDK
    • Android OAuth SDK
    • Mobile Web SDK
    • Number Verification Plugin
  • PRODUCT UPDATES
    • App Review Process
    • Introducing dark theme
Powered by GitBook
On this page

Was this helpful?

  1. ANDROID
  2. SDK v2.8.0
  3. Integrating with your App
  4. Verifying non Truecaller users

Completing Verification

PreviousTrueExceptionNextAdvanced Steps

Last updated 4 years ago

Was this helpful?

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

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

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 )

Depending on whether the verification medium is drop call or OTP, you need to call one of the following methods respectively:

TruecallerSDK.getInstance().verifyMissedCall(profile, apiCallback)

You need to call this method once you have received callback with requestCode as TYPE_MISSED_CALL_RECEIVED in your VerificationCallback instance

TruecallerSDK.getInstance().verifyOtp(profile, OTP, apiCallback)

You need to call this method once you have received the callback in your VerificationCallback instance with requestCode as TYPE_OTP_RECEIVED and the OTP as a string in VerificationDataBundle

If your input mobile number is not present on the same device, you need to ask the user to input the OTP manually in case of OTP based verification

After you call the above method, you will receive a callback in your VerificationCallback instance with requestCode as TYPE_VERIFICATION_COMPLETE, which completes your verification process.

Whenever you get the verification callback with requestType as TYPE_VERIFICATION_COMPLETE, you would get an accessToken as a parameter in the verificationDataBundle. You can use this access token to validate the authenticity of the verification flow by making an API call from your server to Truecaller's server. For details on this part, please refer .

here