# Table of Contents - [Hello! | Truecaller for Developers](#hello-truecaller-for-developers) - [Why Truecaller SDK? | Truecaller for Developers](#why-truecaller-sdk-truecaller-for-developers) - [Getting Started | Truecaller for Developers](#getting-started-truecaller-for-developers) - [[Latest]OAuth SDK 3.2.1 | Truecaller for Developers](#-latest-oauth-sdk-3-2-1-truecaller-for-developers) - [Android | Truecaller for Developers](#android-truecaller-for-developers) - [Implementing user flow for your App | Truecaller for Developers](#implementing-user-flow-for-your-app-truecaller-for-developers) - [Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers](#scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users-truecaller-for-developers) - [Setup | Truecaller for Developers](#setup-truecaller-for-developers) - [Generating Client ID | Truecaller for Developers](#generating-client-id-truecaller-for-developers) - [Integration Steps | Truecaller for Developers](#integration-steps-truecaller-for-developers) - [Invocation | Truecaller for Developers](#invocation-truecaller-for-developers) - [Initialisation | Truecaller for Developers](#initialisation-truecaller-for-developers) - [Setting up OAuth parameters | Truecaller for Developers](#setting-up-oauth-parameters-truecaller-for-developers) - [Implementing Callbacks | Truecaller for Developers](#implementing-callbacks-truecaller-for-developers) - [Customisation | Truecaller for Developers](#customisation-truecaller-for-developers) - [Clearing SDK Instance | Truecaller for Developers](#clearing-sdk-instance-truecaller-for-developers) - [Integrating with your Backend | Truecaller for Developers](#integrating-with-your-backend-truecaller-for-developers) - [Handling Error Scenarios | Truecaller for Developers](#handling-error-scenarios-truecaller-for-developers) - [Fetching User Profile | Truecaller for Developers](#fetching-user-profile-truecaller-for-developers) - [Fetching User Token | Truecaller for Developers](#fetching-user-token-truecaller-for-developers) - [Non Truecaller User Verification | Truecaller for Developers](#non-truecaller-user-verification-truecaller-for-developers) - [Completing Verification | Truecaller for Developers](#completing-verification-truecaller-for-developers) - [TrueException | Truecaller for Developers](#trueexception-truecaller-for-developers) - [Server Side Validation | Truecaller for Developers](#server-side-validation-truecaller-for-developers) - [Instrumentation | Truecaller for Developers](#instrumentation-truecaller-for-developers) - [Getting Release Ready | Truecaller for Developers](#getting-release-ready-truecaller-for-developers) - [Testing your verification flow | Truecaller for Developers](#testing-your-verification-flow-truecaller-for-developers) - [Non-Truecaller user verification flow | Truecaller for Developers](#non-truecaller-user-verification-flow-truecaller-for-developers) - [Truecaller user verification flow | Truecaller for Developers](#truecaller-user-verification-flow-truecaller-for-developers) - [Test Setup | Truecaller for Developers](#test-setup-truecaller-for-developers) - [Google play store app permission declaration form | Truecaller for Developers](#google-play-store-app-permission-declaration-form-truecaller-for-developers) - [Moving to Production | Truecaller for Developers](#moving-to-production-truecaller-for-developers) - [OAuth SDK 3.2.0 | Truecaller for Developers](#oauth-sdk-3-2-0-truecaller-for-developers) - [Implementing user flow for your App | Truecaller for Developers](#implementing-user-flow-for-your-app-truecaller-for-developers) - [Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers](#scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users-truecaller-for-developers) - [Integration Steps | Truecaller for Developers](#integration-steps-truecaller-for-developers) - [Generating Client ID | Truecaller for Developers](#generating-client-id-truecaller-for-developers) - [Setup | Truecaller for Developers](#setup-truecaller-for-developers) - [Implementing Callbacks | Truecaller for Developers](#implementing-callbacks-truecaller-for-developers) - [Initialisation | Truecaller for Developers](#initialisation-truecaller-for-developers) - [Setting up OAuth parameters | Truecaller for Developers](#setting-up-oauth-parameters-truecaller-for-developers) - [Invocation | Truecaller for Developers](#invocation-truecaller-for-developers) - [Clearing SDK Instance | Truecaller for Developers](#clearing-sdk-instance-truecaller-for-developers) - [Customisation | Truecaller for Developers](#customisation-truecaller-for-developers) - [Handling Error Scenarios | Truecaller for Developers](#handling-error-scenarios-truecaller-for-developers) - [Integrating with your Backend | Truecaller for Developers](#integrating-with-your-backend-truecaller-for-developers) - [Fetching User Token | Truecaller for Developers](#fetching-user-token-truecaller-for-developers) - [Fetching User Profile | Truecaller for Developers](#fetching-user-profile-truecaller-for-developers) - [Non Truecaller User Verification | Truecaller for Developers](#non-truecaller-user-verification-truecaller-for-developers) - [Completing Verification | Truecaller for Developers](#completing-verification-truecaller-for-developers) - [Instrumentation | Truecaller for Developers](#instrumentation-truecaller-for-developers) - [Server Side Validation | Truecaller for Developers](#server-side-validation-truecaller-for-developers) - [TrueException | Truecaller for Developers](#trueexception-truecaller-for-developers) - [Moving to Production | Truecaller for Developers](#moving-to-production-truecaller-for-developers) - [Implementing user flow for your App | Truecaller for Developers](#implementing-user-flow-for-your-app-truecaller-for-developers) - [Testing your verification flow | Truecaller for Developers](#testing-your-verification-flow-truecaller-for-developers) - [Non-Truecaller user verification flow | Truecaller for Developers](#non-truecaller-user-verification-flow-truecaller-for-developers) - [Getting Release Ready | Truecaller for Developers](#getting-release-ready-truecaller-for-developers) - [Truecaller user verification flow | Truecaller for Developers](#truecaller-user-verification-flow-truecaller-for-developers) - [Google play store app permission declaration form | Truecaller for Developers](#google-play-store-app-permission-declaration-form-truecaller-for-developers) - [OAuth SDK 3.1.0 | Truecaller for Developers](#oauth-sdk-3-1-0-truecaller-for-developers) - [Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers](#scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users-truecaller-for-developers) - [Test Setup | Truecaller for Developers](#test-setup-truecaller-for-developers) - [Integration Steps | Truecaller for Developers](#integration-steps-truecaller-for-developers) - [Generating Client ID | Truecaller for Developers](#generating-client-id-truecaller-for-developers) - [Instrumentation | Truecaller for Developers](#instrumentation-truecaller-for-developers) - [OAuth SDK 3.0.0 | Truecaller for Developers](#oauth-sdk-3-0-0-truecaller-for-developers) - [Moving to Production | Truecaller for Developers](#moving-to-production-truecaller-for-developers) - [Implementing Callbacks | Truecaller for Developers](#implementing-callbacks-truecaller-for-developers) - [Initialisation | Truecaller for Developers](#initialisation-truecaller-for-developers) - [Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers](#scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users-truecaller-for-developers) - [Getting Release Ready | Truecaller for Developers](#getting-release-ready-truecaller-for-developers) - [Integrating with your Backend | Truecaller for Developers](#integrating-with-your-backend-truecaller-for-developers) - [Testing your verification flow | Truecaller for Developers](#testing-your-verification-flow-truecaller-for-developers) - [Non-Truecaller user verification flow | Truecaller for Developers](#non-truecaller-user-verification-flow-truecaller-for-developers) - [Google play store app permission declaration form | Truecaller for Developers](#google-play-store-app-permission-declaration-form-truecaller-for-developers) - [TrueException | Truecaller for Developers](#trueexception-truecaller-for-developers) - [Invocation | Truecaller for Developers](#invocation-truecaller-for-developers) - [Setting up OAuth parameters | Truecaller for Developers](#setting-up-oauth-parameters-truecaller-for-developers) - [Implementing user flow for your App | Truecaller for Developers](#implementing-user-flow-for-your-app-truecaller-for-developers) - [Clearing SDK Instance | Truecaller for Developers](#clearing-sdk-instance-truecaller-for-developers) - [Truecaller user verification flow | Truecaller for Developers](#truecaller-user-verification-flow-truecaller-for-developers) - [Setup | Truecaller for Developers](#setup-truecaller-for-developers) - [Server Side Validation | Truecaller for Developers](#server-side-validation-truecaller-for-developers) - [Test Setup | Truecaller for Developers](#test-setup-truecaller-for-developers) - [Handling Error Scenarios | Truecaller for Developers](#handling-error-scenarios-truecaller-for-developers) - [Completing Verification | Truecaller for Developers](#completing-verification-truecaller-for-developers) - [Fetching User Profile | Truecaller for Developers](#fetching-user-profile-truecaller-for-developers) - [Invocation | Truecaller for Developers](#invocation-truecaller-for-developers) - [Fetching User Token | Truecaller for Developers](#fetching-user-token-truecaller-for-developers) - [Generating Client ID | Truecaller for Developers](#generating-client-id-truecaller-for-developers) - [Clearing SDK Instance | Truecaller for Developers](#clearing-sdk-instance-truecaller-for-developers) - [Integration Steps | Truecaller for Developers](#integration-steps-truecaller-for-developers) - [Implementing Callbacks | Truecaller for Developers](#implementing-callbacks-truecaller-for-developers) - [Non Truecaller User Verification | Truecaller for Developers](#non-truecaller-user-verification-truecaller-for-developers) - [Initialisation | Truecaller for Developers](#initialisation-truecaller-for-developers) - [Setting up OAuth parameters | Truecaller for Developers](#setting-up-oauth-parameters-truecaller-for-developers) - [Setup | Truecaller for Developers](#setup-truecaller-for-developers) - [Product Updates | Truecaller for Developers](#product-updates-truecaller-for-developers) - [App Review Process | Truecaller for Developers](#app-review-process-truecaller-for-developers) - [Number Verification Plugin | Truecaller for Developers](#number-verification-plugin-truecaller-for-developers) - [Generating App Key | Truecaller for Developers](#generating-app-key-truecaller-for-developers) - [Instrumentation | Truecaller for Developers](#instrumentation-truecaller-for-developers) - [Getting Release Ready | Truecaller for Developers](#getting-release-ready-truecaller-for-developers) - [Customisation | Truecaller for Developers](#customisation-truecaller-for-developers) - [Deactivating App Block | Truecaller for Developers](#deactivating-app-block-truecaller-for-developers) - [Shopify App | Truecaller for Developers](#shopify-app-truecaller-for-developers) - [Mobile Websites | Truecaller for Developers](#mobile-websites-truecaller-for-developers) - [Server Side Response Validation | Truecaller for Developers](#server-side-response-validation-truecaller-for-developers) - [iOS | Truecaller for Developers](#ios-truecaller-for-developers) - [Generating App Key | Truecaller for Developers](#generating-app-key-truecaller-for-developers) - [Instrumentation | Truecaller for Developers](#instrumentation-truecaller-for-developers) - [Implementing user flow for your Mobile Website | Truecaller for Developers](#implementing-user-flow-for-your-mobile-website-truecaller-for-developers) - [Introducing dark theme | Truecaller for Developers](#introducing-dark-theme-truecaller-for-developers) - [Handling Error Scenarios | Truecaller for Developers](#handling-error-scenarios-truecaller-for-developers) - [Setup | Truecaller for Developers](#setup-truecaller-for-developers) - [Handling Error Scenarios | Truecaller for Developers](#handling-error-scenarios-truecaller-for-developers) - [Getting Release Ready | Truecaller for Developers](#getting-release-ready-truecaller-for-developers) - [Server Side Response Validation | Truecaller for Developers](#server-side-response-validation-truecaller-for-developers) - [Non-Truecaller user verification flow | Truecaller for Developers](#non-truecaller-user-verification-flow-truecaller-for-developers) - [FAQS | Truecaller for Developers](#faqs-truecaller-for-developers) - [Google play store app permission declaration form | Truecaller for Developers](#google-play-store-app-permission-declaration-form-truecaller-for-developers) - [Fetching User Token | Truecaller for Developers](#fetching-user-token-truecaller-for-developers) - [SDK v2.8.0[Deprecating Soon ⚠️] | Truecaller for Developers](#sdk-v2-8-0-deprecating-soon-truecaller-for-developers) - [Generating App Key | Truecaller for Developers](#generating-app-key-truecaller-for-developers) - [Integrating with your Backend | Truecaller for Developers](#integrating-with-your-backend-truecaller-for-developers) - [Handling Error Scenarios | Truecaller for Developers](#handling-error-scenarios-truecaller-for-developers) - [Testing your verification flow | Truecaller for Developers](#testing-your-verification-flow-truecaller-for-developers) - [Testing your verification flow | Truecaller for Developers](#testing-your-verification-flow-truecaller-for-developers) - [Moving to Production | Truecaller for Developers](#moving-to-production-truecaller-for-developers) - [Truecaller user verification flow | Truecaller for Developers](#truecaller-user-verification-flow-truecaller-for-developers) - [Usage | Truecaller for Developers](#usage-truecaller-for-developers) - [Change Log | Truecaller for Developers](#change-log-truecaller-for-developers) - [Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers](#scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users-truecaller-for-developers) - [Invoking verification | Truecaller for Developers](#invoking-verification-truecaller-for-developers) - [Integrating with your mobile website | Truecaller for Developers](#integrating-with-your-mobile-website-truecaller-for-developers) - [Configuration | Truecaller for Developers](#configuration-truecaller-for-developers) - [Completing Verification | Truecaller for Developers](#completing-verification-truecaller-for-developers) - [Implementing user flow for your app | Truecaller for Developers](#implementing-user-flow-for-your-app-truecaller-for-developers) - [Verifying Non-Truecaller app users | Truecaller for Developers](#verifying-non-truecaller-app-users-truecaller-for-developers) - [Generating App Key | Truecaller for Developers](#generating-app-key-truecaller-for-developers) - [Test Setup | Truecaller for Developers](#test-setup-truecaller-for-developers) - [For Truecaller users verification flow | Truecaller for Developers](#for-truecaller-users-verification-flow-truecaller-for-developers) - [Integrating with your iOS App | Truecaller for Developers](#integrating-with-your-ios-app-truecaller-for-developers) - [Developer Account | Truecaller for Developers](#developer-account-truecaller-for-developers) - [Test Setup | Truecaller for Developers](#test-setup-truecaller-for-developers) - [Clearing SDK instance | Truecaller for Developers](#clearing-sdk-instance-truecaller-for-developers) - [Completing Verification | Truecaller for Developers](#completing-verification-truecaller-for-developers) - [Completing User Verification | Truecaller for Developers](#completing-user-verification-truecaller-for-developers) - [App Configuration | Truecaller for Developers](#app-configuration-truecaller-for-developers) - [Getting Release Ready | Truecaller for Developers](#getting-release-ready-truecaller-for-developers) - [Safari Redirection | Truecaller for Developers](#safari-redirection-truecaller-for-developers) - [Server Side Validation | Truecaller for Developers](#server-side-validation-truecaller-for-developers) - [Mobile Web SDK | Truecaller for Developers](#mobile-web-sdk-truecaller-for-developers) - [Testing your verification flow | Truecaller for Developers](#testing-your-verification-flow-truecaller-for-developers) - [Fetching User Profile | Truecaller for Developers](#fetching-user-profile-truecaller-for-developers) - [TrueException | Truecaller for Developers](#trueexception-truecaller-for-developers) - [Fetch User Profile | Truecaller for Developers](#fetch-user-profile-truecaller-for-developers) - [Google Play Policy Change for Device Identifiers | Truecaller for Developers](#google-play-policy-change-for-device-identifiers-truecaller-for-developers) - [Instrumentation | Truecaller for Developers](#instrumentation-truecaller-for-developers) - [Swift | Truecaller for Developers](#swift-truecaller-for-developers) - [Google Play App Signing | Truecaller for Developers](#google-play-app-signing-truecaller-for-developers) - [App Key Configuration | Truecaller for Developers](#app-key-configuration-truecaller-for-developers) - [Setup | Truecaller for Developers](#setup-truecaller-for-developers) - [Google Play Store app permissions declaration | Truecaller for Developers](#google-play-store-app-permissions-declaration-truecaller-for-developers) - [Truecaller user verification flow | Truecaller for Developers](#truecaller-user-verification-flow-truecaller-for-developers) - [Integrating with your App | Truecaller for Developers](#integrating-with-your-app-truecaller-for-developers) - [Advanced Steps | Truecaller for Developers](#advanced-steps-truecaller-for-developers) - [Objective-C | Truecaller for Developers](#objective-c-truecaller-for-developers) - [Non-Truecaller User Verification Flow | Truecaller for Developers](#non-truecaller-user-verification-flow-truecaller-for-developers) - [TrueException | Truecaller for Developers](#trueexception-truecaller-for-developers) - [Customisation | Truecaller for Developers](#customisation-truecaller-for-developers) - [Customisation | Truecaller for Developers](#customisation-truecaller-for-developers) - [Handling Error Scenarios | Truecaller for Developers](#handling-error-scenarios-truecaller-for-developers) - [For Non-Truecaller users verification flow | Truecaller for Developers](#for-non-truecaller-users-verification-flow-truecaller-for-developers) - [General | Truecaller for Developers](#general-truecaller-for-developers) - [Non Truecaller User Verification | Truecaller for Developers](#non-truecaller-user-verification-truecaller-for-developers) - [Completing Verification | Truecaller for Developers](#completing-verification-truecaller-for-developers) - [Implement Callbacks | Truecaller for Developers](#implement-callbacks-truecaller-for-developers) - [Verifying non Truecaller users | Truecaller for Developers](#verifying-non-truecaller-users-truecaller-for-developers) - [Changelog | Truecaller for Developers](#changelog-truecaller-for-developers) - [Android OAuth SDK | Truecaller for Developers](#android-oauth-sdk-truecaller-for-developers) - [Initialisation | Truecaller for Developers](#initialisation-truecaller-for-developers) - [Initialisation | Truecaller for Developers](#initialisation-truecaller-for-developers) - [Android App SDK | Truecaller for Developers](#android-app-sdk-truecaller-for-developers) - [Email Protection | Cloudflare](#email-protection-cloudflare) - [Get to know Truecaller Customer Experience Solution | Truecaller for Business](#get-to-know-truecaller-customer-experience-solution-truecaller-for-business) - [Does the Verified Business Caller ID work for iOS users? | Truecaller for Business](#does-the-verified-business-caller-id-work-for-ios-users-truecaller-for-business) - [What are the iOS settings required to enable the Verified Business Caller ID badge? | Truecaller for Business](#what-are-the-ios-settings-required-to-enable-the-verified-business-caller-id-badge-truecaller-for-business) - [Can I use virtual numbers? | Truecaller for Business](#can-i-use-virtual-numbers-truecaller-for-business) - [What are the Android settings required to enable the Truecaller Caller ID? | Truecaller for Business](#what-are-the-android-settings-required-to-enable-the-truecaller-caller-id-truecaller-for-business) - [Are there any early access programs I can be a part of? | Truecaller for Business](#are-there-any-early-access-programs-i-can-be-a-part-of-truecaller-for-business) - [What languages are supported in the Verified Business Caller ID? | Truecaller for Business](#what-languages-are-supported-in-the-verified-business-caller-id-truecaller-for-business) - [Account Management and Billing | Truecaller for Business](#account-management-and-billing-truecaller-for-business) - [Account Creation | Truecaller for Business](#account-creation-truecaller-for-business) - [Manage Listing | Truecaller for Business](#manage-listing-truecaller-for-business) - [Does the Verified Business Caller ID work on all telco networks, phones and OS platforms? | Truecaller for Business](#does-the-verified-business-caller-id-work-on-all-telco-networks-phones-and-os-platforms-truecaller-for-business) - [Spam Management | Truecaller for Business](#spam-management-truecaller-for-business) - [Can I get a customized Verified Business Caller ID or choose the color of the Caller ID? | Truecaller for Business](#can-i-get-a-customized-verified-business-caller-id-or-choose-the-color-of-the-caller-id-truecaller-for-business) - [Managing Feature Sets | Truecaller for Business](#managing-feature-sets-truecaller-for-business) - [Account Suspension | Truecaller for Business](#account-suspension-truecaller-for-business) - [Onboarding | Truecaller for Business](#onboarding-truecaller-for-business) - [Features | Truecaller for Business](#features-truecaller-for-business) - [Roles and Permissions | Truecaller for Business](#roles-and-permissions-truecaller-for-business) - [How do I list phone numbers using Manage Listing? | Truecaller for Business](#how-do-i-list-phone-numbers-using-manage-listing-truecaller-for-business) --- # Hello! | Truecaller for Developers Welcome to Truecaller SDK documentation! Here you will find answers to all your queries on how to easily integrate Verification via Truecaller feature into your mobile app and mobile sites. **What is Truecaller SDK?** Truecaller SDK is a mobile number verification service, which you can use wherever you look to verify your users. With more than 400+ million users globally, Truecaller is the largest mobile number identity platform. This means that these 400+ million users who have Truecaller mobile app on their mobile devices, have created their profiles with Truecaller by verifying their mobile numbers, and associating their identity. Since these users are already mobile number verified, verification via Truecaller enables you to quickly verify/ signup/ login your users, basis their mobile number - without the need of any SMS based OTP, and at the same time capture their mapped user profile. Along with this, the SDK also gives you an option to verify users who do not have the Truecaller app present on their devices, via the means of a drop call being triggered to the user's device in background [arrow-up-right](https://docs.truecaller.com/truecaller-sdk/why-truecaller-sdk) [NextWhy Truecaller SDK?chevron-right](https://docs.truecaller.com/truecaller-sdk/why-truecaller-sdk) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Why Truecaller SDK? | Truecaller for Developers Here are some advantages of using Truecaller SDK: * **Increase successful verification/ signup/ login attempts** with already mobile number verified Truecaller users. * **Avoid user drop-off and app abandonment with** 1-tap, instant verification - without any OTP SMS whatsoever. * **Simple, ZERO effort flow and avoid typos as** users do not even need to type mobile number. * **Auto-fill user registration form by** capturing mapped user profile (user name, email ID, city, etc.) post their consent. * **Achieve easy user activation and quick checkout** with less number of steps/ screens. * **Optimize marketing spends and ROI by** by reducing user drops resulting from failed/ delayed SMS OTP and multiple steps. [PreviousHello!chevron-left](https://docs.truecaller.com/truecaller-sdk) [NextGetting Startedchevron-right](https://docs.truecaller.com/truecaller-sdk/getting-started) Last updated 9 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Started | Truecaller for Developers You should start by creating your developer account on the Truecaller Developer portal here: [https://sdk-console-noneu.truecaller.com/sign-uparrow-up-right](https://sdk-console-noneu.truecaller.com/sign-up) a) Register with email ID and set a password. b) Verify your email ID to proceed. PS: The developer portal link shared above is only for registering android apps, if you are looking to do the integration in Mobile Site, iOS or any other platform please sign via this developer portal link : [https://verification-sdk-console.truecaller.com/sign-uparrow-up-right](https://verification-sdk-console.truecaller.com/sign-up) circle-info We recommend you to create your account with a team generic email ID, instead of a personal email ID. For example: Use [\[email protected\]envelope](https://docs.truecaller.com/cdn-cgi/l/email-protection#354150565d75414740505654595950471b565a58) or [\[email protected\]envelope](https://docs.truecaller.com/cdn-cgi/l/email-protection#cfaea1abbda0a6ab8fbbbdbaaaacaea3a3aabde1aca0a2) , instead of [\[email protected\]arrow-up-right](http://john.doe/) . circle-info In case you do not see the account verification email in your Primary Inbox, please do check for the same in your Other and Spam email inbox as well. If you already have created your developer account, please login [herearrow-up-right](https://developer.truecaller.com/login) . To reset your account password, please request for it [herearrow-up-right](https://developer.truecaller.com/forgot-password) . [PreviousWhy Truecaller SDK?chevron-left](https://docs.truecaller.com/truecaller-sdk/why-truecaller-sdk) [NextAndroidchevron-right](https://docs.truecaller.com/truecaller-sdk/android) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # [Latest]OAuth SDK 3.2.1 | Truecaller for Developers [Implementing user flow for your App](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) [Scenarios for all user verifications : Truecaller and Non Truecaller Users](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [Integration Steps](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps) [Instrumentation](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/instrumentation) [Getting Release Ready](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready) [PreviousAndroidchevron-left](https://docs.truecaller.com/truecaller-sdk/android) [NextImplementing user flow for your Appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/implementing-user-flow-for-your-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Android | Truecaller for Developers [OAuth SDK 3.0.0](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0) [SDK v2.8.0\[Deprecating Soon ⚠️\]](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon) [PreviousGetting Startedchevron-left](https://docs.truecaller.com/truecaller-sdk/getting-started) [Next\[Latest\]OAuth SDK 3.2.1chevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing user flow for your App | Truecaller for Developers Truecaller SDK is a mobile number verification service, without the need for any OTP whatsoever. The right way to implement Truecaller SDK in your mobile app, is to invoke mobile number verification via Truecaller at touch points, where you have your users to sign-up/ login/ checkout by verifying their mobile numbers. Let us now see an example to understand how to effectively use Truecaller SDK at such touch points in your user journey When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number based identity verification of users. Here is such an example from CentroStore - our very own in-house sample app: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F1KVL1MIKWHHX76KTm30E%252F1.jpeg%3Falt%3Dmedia%26token%3Dd95c55e4-d43c-45e6-b3d9-1621fbed65f2&width=768&dpr=3&quality=100&sign=d39e6080&sv=2) ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fo7WXd2Zi2FfkHZZ15exp%252F2.jpeg%3Falt%3Dmedia%26token%3D90743df1-23e5-41d5-9700-44b4886b3613&width=768&dpr=3&quality=100&sign=59893bf1&sv=2) **Building for Various Touch points** _a. Invoking user signup/ login/ verification via Truecaller at app onboarding_ Example: CentroStore - our very own in-house sample app When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number-based identity verification of users. Here is such an example from CetroStore. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FWe9hMyqshD98OVRG7Uiz%252F3.jpeg%3Falt%3Dmedia%26token%3D2b1a8f01-5824-4ad3-b21d-9bb67c053648&width=768&dpr=3&quality=100&sign=d9ca2645&sv=2) _b. Directly invoking verification via Truecaller_ Example : CentroStore - our very own in-house sample app CentroStore has mobile number as the primary identifier for its users. So as soon as users lands on their mobile number login/ signup screen, it invokes Verification via Truecaller, and onboards it’s users within seconds in just 1-tap. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEjoGonnuIM8soJqIE9uO%252F4.jpeg%3Falt%3Dmedia%26token%3Dd3da39c9-5239-4717-b58a-f4ced1201d01&width=768&dpr=3&quality=100&sign=fb6369d1&sv=2) _c. Performing user verification at checkout_ Example : CentroStore - our very own in-house sample app CentroStore also allows users to browse through it’s app and check for bus ETAs, without needing to sign-up or log-in. However, when users wish to purchase the ticket or travel pass, it requires users to verify their mobile number. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FqKIRQInvtNrAZ368r1cO%252F5.jpeg%3Falt%3Dmedia%26token%3Da08557eb-9277-4441-bda8-17c24215834e&width=768&dpr=3&quality=100&sign=2a93dfef&sv=2) Now that we have gone through and understood how to implement Verification via Truecaller, let’s get started with the SDK integration. [Previous\[Latest\]OAuth SDK 3.2.1chevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1) [NextScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers Truecaller SDK enables you to verify your user's mobile number in a seamless way. For users who have the Truecaller app present on their smartphones and are already registered Truecaller users, they get verified in a 1-tap flow (supported globally), without the need of any manual input. For users who don't have the Truecaller app present on their smartphones, the SDK enables user verification by means of a drop call, which is triggered to the user's number in the background to complete the verification flow (currently supported only for India). To understand various possible user scenarios in the user's verification flow, let's try to take the example of CentroStore. CetroStore is using Truecaller SDK for verifying the numbers of all their users. **Scenario 1** a) New user on CentroStore app and b) Truecaller app present on user's smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F0T7qa39FRammgXXTAr5G%252FScreenshot%25202024-06-07%2520103558.png%3Falt%3Dmedia%26token%3D3dcd01dd-0cc8-4e12-a64a-9c09d834fb30&width=768&dpr=3&quality=100&sign=831552c9&sv=2) **Scenario 2** a) Existing user on CentroStore app, and b) Truecaller app present on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FGd2Gedi2bFSRqKSud0Uq%252FScreenshot%25202024-06-07%2520103807.png%3Falt%3Dmedia%26token%3D80841c3b-346b-4b62-8444-3b1cde79cfc2&width=768&dpr=3&quality=100&sign=af238adb&sv=2) **Scenario 3** a) New user on CentroStore app, and b) Truecaller app NOT present on a smartphone, and user's mobile number NOT already verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEI4bnKCb43bwDYrAeDZY%252FScreenshot%25202024-06-07%2520125435.png%3Falt%3Dmedia%26token%3Dd1c1dae4-f148-405e-879e-f035403cad5c&width=768&dpr=3&quality=100&sign=34d513ef&sv=2) **Scenario 4** a) Existing user on CentroStore app, and b) Truecaller app NOT present on smartphone and user's mobile number NOT verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FTejP6sDz7ifyZoMuZBpI%252FScreenshot%25202024-06-07%2520125812.png%3Falt%3Dmedia%26token%3D899db593-7449-45df-ac4e-b58d15954f84&width=768&dpr=3&quality=100&sign=489ccb3b&sv=2) [PreviousImplementing user flow for your Appchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/implementing-user-flow-for-your-app) [NextIntegration Stepschevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Setup | Truecaller for Developers 1. Ensure that your Minimum SDK version is at least API level 24 or above. In case your android project compiles for API level below 24, you can include the following line in your AndroidManifest.xml file to avoid any compilation issues : `` Using this would ensure that the SDK works normally for API level 24 & above, and would be disabled for API level < 24. Note: Please make sure that you put the necessary API level checks before accessing the SDK methods in case of compiling for API level < 24 2. **2.1)** Add the Truecaller SDK which contains OAuth functionality to your **app-level build.gradle** file `dependencies {` `...` `implementation "com.truecaller.android.sdk:truecaller-sdk:3.2.0"` `}` **2.2)** Also, add the following lines of code in your gradle file, if not already present `android{` `compileOptions{` `sourceCompatibility JavaVersion.VERSION_1_8` `targetCompatibility JavaVersion.VERSION_1_8` `}` `}` 3. Add mavenCentral() in your project level **build.gradle** file : `allprojects{` `repositories{` `...` `mavenCentral()` `...` `}` Also check your AGP and distribution URL version AGP : 7.4.2 (minimum) distributionUrl=https\\://[services.gradle.org/distributions/gradle-7.5-bin.ziparrow-up-right](http://services.gradle.org/distributions/gradle-7.5-bin.zip) (minimum). 4. **Configure Client ID :** a.) Open your strings.xml file. Example path: /app/src/main/res/values/strings.xml and add a new string with the name "clientID" and value as your "clientID" b.) Open your AndroidManifest.xml and add a meta-data element to the application element `...` `` `...` [PreviousGenerating Client IDchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/generating-client-id) [NextImplementing Callbackschevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/implementing-callbacks) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating Client ID | Truecaller for Developers To ensure the authenticity of interactions between your app and Truecaller, you need to generate a client ID from the Truecaller developer portal by following the steps below: * Go to [https://sdk-console-noneu.truecaller.com/loginarrow-up-right](https://sdk-console-noneu.truecaller.com/login) and register your account. * Once registered, log in to your account and click on the "create project” button. * Enter the project name and select the business category from the dropdown menu. This will create a new project. * On the project screen, click the “add credential” button and select the platform as Android from the dropdown menu. * On the credential section, enter the package name and the SHA1. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FNSNf4oRlLaQVErDSH90S%252FA.png%3Falt%3Dmedia%26token%3D2c794ccc-b34c-41a8-a994-8dda65fef417&width=768&dpr=3&quality=100&sign=b935eaeb&sv=2) * Your package name corresponds to the applicationId in your app level `build.gradle` file. You can get to know the SHA1 for your different app builds by following these steps : * Open your project in android studio * Open terminal * Type command `./gradlew signingReport` Once done you should be able to see the SHA1 fingerprint of your different build configurations \[ debug /release \] in the terminal window within the android studio. Once you input your app details and create the app, you will be able to see a unique "ClientID" for your app which you need to include in your project to authorise all verification requests. [PreviousIntegration Stepschevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps) [NextSetupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integration Steps | Truecaller for Developers circle-info In order to proceed with the integration, please refer to [the previous sectionsarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/implementing-user-flow-for-your-app) so as to understand various user flows and touch points in the user journey where Truecaller can be enabled. * Register on the [OAuth portalarrow-up-right](https://sdk-console-noneu.truecaller.com/) to create your business account and manage OAuth projects. * Once you have created your account, create your OAuth project & generate credentials by following the steps [here.](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) * Once you have generated the credentials, you can easily, in a few simple steps integrate the Truecaller SDK by referring to our step-by-step guide in the subsequent sections. * Post integration completion, submit your project for review and go live. [PreviousScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [NextGenerating Client IDchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/generating-client-id) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Invocation | Truecaller for Developers 1. You can trigger the Truecaller profile verification dialog anywhere in your app flow by calling the following method Copy TcSdk.getInstance().getAuthorizationCode(this, launcher) where the launcher is derived in step 5 ([Implementing Callbackarrow-up-right](https://docs.truecaller.com/truecaller-sdk/~/revisions/nSPuRXISTt65PkMyKKJS/android/oauth-sdk-3.2.0/integration-steps/implementing-callbacks) ) In case isOAuthFlowUsable() method returns false, implying that the Truecaller app is not present on the device, you can take the user to your app screen and continue with the verification flow for non-Truecaller users or implement your fallback verification mechanism. circle-info Please note that the instance you pass in the method above should be of the activity/fragment where you have initialized the SDK. [PreviousSetting up OAuth parameterschevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/setting-up-oauth-parameters) [NextCustomisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/customisation) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Initialisation | Truecaller for Developers 1. Create a TcSdkOptions object by using the tcOAuthCallback from the previous step and provide the context. Supply the appropriate customization settings to the relevant methods of TcSdkOptions and use the instance of tcSdkOptions to initialize the TcSdk in the next step. Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .buttonColor(Color.parseColor("<>")) .buttonTextColor(Color.parseColor("<>")) .loginTextPrefix(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .ctaText(TcSdkOptions.CTA_TEXT_CONTINUE) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_SKIP) .consentTitleOption(TcSdkOptions.SDK_CONSENT_TITLE_LOG_IN) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .build(); In case you do not wish to provide any customization settings and fall back to the default SDK settings, you may simply call - Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback).build() 1. Initialize TcSdk using the tcSdkOptions from the previous step : Copy TcSdk.init(tcSdkOptions) Note: Truecaller OAuth SDK needs to be initialized only once in the component and the same instance can be accessed without the need to initialize it again, via **TcSdk.getInstance()** Ideally, you should call the init() method when the component is getting created/initialized to avoid calling it multiple times. The SDK init should always happen in a background thread. You can refer to an example snippet below \[Recommended\] : Copy launch { withContext(Dispatchers.IO) { TcSdk.init(tcSdkOptions) } // Now can access TcSdk.getInstance() } 1. Once the SDK is initialized, check whether the OAuth functionality is usable or not by calling : If _isUsable_ is True, you can proceed with further steps, otherwise, you’d have to fall back to some other mechanism ( your fallback verification flow ). Calling other SDK methods when isUsable is False would result in an exception, so please ensure to call this soon after initializing the SDK, and proceed to further steps only if this method returns True. [PreviousImplementing Callbackschevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/implementing-callbacks) [NextSetting up OAuth parameterschevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/setting-up-oauth-parameters) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val isUsable = TcSdk.getInstance().isOAuthFlowUsable sun-brightdesktopmoon --- # Setting up OAuth parameters | Truecaller for Developers 1. Set a unique state parameter & store it in the current session to use it later in the onSuccess() callback method of the TcOAuthCallback to match if the state received from the authorization server is the same as set here to prevent request forgery attacks. Copy stateRequested = BigInteger(130, SecureRandom()).toString(32) TcSdk.getInstance().setOAuthState(stateRequested) One good choice for a state token is a string of around 32 characters constructed using a high-quality random-number generator as we did above. Another approach could be a hash generated by signing some of your session state variables with a key that is kept secret on your back-end. circle-exclamation Truecaller OAuth SDK already verifies the request-response correlation before forwarding it to the your app. 1. Set the list of scopes to be requested. Copy TcSdk.getInstance().setOAuthScopes(arrayOf("profile", "phone", ...)) // Currently available list of scopes : - profile - phone - openid - offline_access - email - address Note : Please include the relevant scopes for your project. Make sure the scopes you’re requesting above are selected on the portal for your project 1. Generate a unique code verifier & store it in the current session since it would be required later to generate the access token. It can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method generates a random code verifier string using SecureRandom as the source of entropy with 64 as the default entropy quantity. 1. Set the corresponding code challenge using the code verifier generated in the previous step. This can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method produces a code challenge from the supplied code verifier using SHA-256 as the challenge method and Base64 as encoding if the system supports it (all Android devices should ideally support SHA-256 and Base64), but in rare case if the device doesn’t, then this method would return null meaning that you can’t proceed further. Please ensure to have a null safe check for such cases. [PreviousInitialisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/initialisation) [NextInvocationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/invocation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy codeVerifier = CodeVerifierUtil.generateRandomCodeVerifier() Copy val codeChallenge = CodeVerifierUtil.getCodeChallenge(codeVerifier) codeChallenge?.let { TcSdk.getInstance().setCodeChallenge(it) } ?: print(“Code challenge is Null. Can’t proceed further”) sun-brightdesktopmoon --- # Implementing Callbacks | Truecaller for Developers 1. In your Activity/Fragment where you want to integrate the Truecaller OAuth flow, either make the component implement the interface TcOAuthCallback or create an instance of it which you would require to initialize TcSdkOptions in the next step. The interface has 2 functions which need to be overridden - Copy private val tcOAuthCallback: TcOAuthCallback = object : TcOAuthCallback { override fun onSuccess(tcOAuthData: TcOAuthData) { .. } override fun onFailure(tcOAuthError: TcOAuthError) { .. } } * _onFailure()_ method will be called in case of an error. You would get the error details like the error code and error message through tcOAuthError returned with this method. * _onSuccess()_ method will be called when the user gives consent to authorize your app by tapping on the primary button on the Truecaller’s consent screen, and subsequently, an authorization code will be successfully generated and received. This method would return tcOAuthData, which contains information like : **Auth Parameters** \[Live\] * authorizationCode - which you can utilize to fetch the user’s access token * scopesGranted - list of scopes granted by the user * state - state parameter returned by the authorisation server. If the state set by your application is the same as the state returned by the authorisation server, it’s safe to proceed further. If state parameters are different, someone else has initiated the request, and it could be a case of request forgery. **\[New\] Sim and Device Info Parameters** \[EAP - for access, mail us at [\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection)\ \] * **Sim Status** - This will be a parameter returned to you in successCallback, which helps understand whether the number passed to you is actually present on the device at the time of verification. In case it is present, the variable returns 1, In case it's not present, the variable returns 0, and in case, due to OS level restrictions, the SDK is not able to detect it, the variable returns -1 * **Device Code** - This parameter helps you tie the number onboarded on your platform to a particular device identifier. This parameter for a user on a device will always be the same until the Truecaller profile is changed on that very device OR the user is using some other device to verify their number. 1. Call onActivityResultObtained() within the registerForActivityResult() like below: and then assign it to a variable (Ex: launcher) to use it under step 13 ([Invocationarrow-up-right](https://docs.truecaller.com/truecaller-sdk/~/revisions/nSPuRXISTt65PkMyKKJS/android/oauth-sdk-3.2.0/integration-steps/invocation) ). [PreviousSetupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/setup) [NextInitialisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/initialisation) Last updated 5 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val launcher = registerForActivityResult(StartActivityForResult()) { result: ActivityResult -> TcSdk.getInstance().onActivityResultObtained(requireActivity(), result.resultCode, result.data) } sun-brightdesktopmoon --- # Customisation | Truecaller for Developers Truecaller SDK provides you with capabilities to configure the following: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FlaFG2xmhOyuNRXaxPju6%252FB.jpeg%3Falt%3Dmedia%26token%3Dab5338c8-42be-4478-baf3-31941a0aa7db&width=768&dpr=3&quality=100&sign=824c25dc&sv=2) Refer to the section below for details on all the customization capabilities and the possible values you may set: Copy TcSdkOptions.Builder(this, tcOAuthCallback) .consentMode(TcSdkOptions.CONSENT_MODE_BOTTOMSHEET) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_ANOTHER_MOBILE_NO) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .ctaText(TcSdkOptions.CTA_TEXT_ACCEPT) .heading(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .buttonColor(1111) .buttonTextColor(1111) .build() **Consent Mode Style \[ .consentMode() \]** To align the consent screen with your UX, which could either be centrally or bottom aligned, choose either of the consent screens, making the SDK integration more homogeneous with your app UX. Consent Mode Value Consent Mode - Center PopUp TcSdkOptions.CONSENT\_MODE\_POPUP Consent Mode - Bottomsheet TcSdkOptions.CONSENT\_MODE\_BOTTOMSHEET **Contextual header \[ .heading() \]** To provide the appropriate context of verification to the Truecaller user, use one of the below mentioned TruecallerSdkScope values to show the corresponding message to the user Log in to TcSdkOptions.SDK\_CONSENT\_HEADING\_LOG\_IN\_TO Sign up with TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGNUP\_WITH Sign in to TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGN\_IN\_TO Verify number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_NUMBER\_WITH Register with TcSdkOptions.SDK\_CONSENT\_HEADING\_REGISTER\_WITH Get started with TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_STARTED\_WITH Proceed with TcSdkOptions.SDK\_CONSENT\_HEADING\_PROCEED\_WITH Verify with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_WITH Verify profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PROFILE\_WITH Verify your profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_PROFILE\_WITH Verify your phone number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PHONE\_NO\_WITH Verify your number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_NO\_WITH Continue with TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_WITH Complete order with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_ORDER\_WITH Place order with TcSdkOptions.SDK\_CONSENT\_HEADING\_PLACE\_ORDER\_WITH Complete booking with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_BOOKING\_WITH Checkout with TcSdkOptions.SDK\_CONSENT\_HEADING\_CHECKOUT\_WITH Manage Details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_DETAILS\_WITH Manage your details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_YOUR\_DETAILS\_WITH Login to <> with one tap TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_TO\_WITH\_ONE\_TAP Subscribe to TcSdkOptions.SDK\_CONSENT\_HEADING\_SUBSCRIBE\_TO Get updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_UPDATES\_FROM Continue reading on TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_READING\_ON Get new updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_NEW\_UPDATES\_FROM Log in/ Signup with TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_SIGNUP\_WITH **Button text options \[ .ctaTextPrefix() \]** To set the prefix on the CTA button Continue TcSdkOptions.CTA\_TEXT\_CONTINUE Proceed TcSdkOptions.CTA\_TEXT\_PROCEED Accept TcSdkOptions.CTA\_TEXT\_ACCEPT Confirm TcSdkOptions.CTA\_TEXT\_COFIRM **Button shape \[ .buttonShapeOptions() \]** To chose the shape of the CTA button Round TcSdkOptions.BUTTON\_SHAPE\_ROUNDED Rectangle TcSdkOptions.BUTTON\_SHAPE\_RECTANGLE **Footer CTA text \[ .footerType() \]** To configure the text of the additional footer CTA present at the bottom Use another number TcSdkOptions.FOOTER\_TYPE\_CONTINUE Use another method TcSdkOptions.FOOTER\_TYPE\_ANOTHER\_METHOD Enter details manually TcSdkOptions.FOOTER\_TYPE\_MANUALLY Later TcSdkOptions.FOOTER\_TYPE\_LATER **Dark Theme** To set the consent screen in dark mode, you can call `TcSdk.getInstance().setTheme(OAuthThemeOptions.DARK)` just before calling the `TcSdk.getInstance().getAuthorizationCode(this, launcher)` By default, the SDK is configured with the light theme. **Privacy policy :** To add your privacy policy link on the verification screen, you can configure the respective hyperlink from your developer account **Terms of service:** To add your terms of service link on the verification screen, you can configure the respective hyperlink from your developer account **Language:** You can optionally customize the consent screen in any of the supported languages. To do so, add the following line : Copy Currently supported languages: english en hindi hi marathi mr telugu te malayalam ml urdu ur punjabi pa tamil ta bengali bn kannada kn swahili sw arabic ar [PreviousInvocationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/invocation) [NextClearing SDK Instancechevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/clearing-sdk-instance) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val locale = Locale("hi") // change language to Hindi TcSdk.getInstance().setLocale(locale) sun-brightdesktopmoon --- # Clearing SDK Instance | Truecaller for Developers In order to clear the resources taken up by the SDK, you may use the following method `TcSdk.clear()` Ideally, you should call this method when the component in which you initialized the SDK is getting killed/destroyed. For instance, if you have initialized the SDK in the onCreate() method of the activity lifecycle, then you need to call clear it in the onDestroy() method of the activity lifecycle. [PreviousCustomisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/customisation) [NextHandling Error Scenarioschevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/handling-error-scenarios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integrating with your Backend | Truecaller for Developers [Fetching User Token](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-token) [Fetching User Profile](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-profile) [PreviousHandling Error Scenarioschevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/handling-error-scenarios) [NextFetching User Tokenchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/integrating-with-your-backend/fetching-user-token) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Handling Error Scenarios | Truecaller for Developers **Failure/ Error responses** The "onFailure" callback method that you just implemented in the previous step helps you to handle all the possible failure cases when the user couldn't be verified successfully via the Truecaller flow. Below are some of the possible failure scenarios and the corresponding error response that you receive for each of the cases : Error Description Error Code "Something went wrong" 0 "Device is not supported" 16 "Truecaller user has an invalid account state" 10 "Invalid partner or partner information is missing" 12 "Conflicting request code possible in onActivityResult()" 6 "Truecaller app closed unexpectedly" 7 "Truecaller app is not installed/loggedin" 5 "User denied by pressing the footer button" 11 "User denied by dismissing consent screen" 14 "User denied while loading" 2 "Truecaller sdk is old and not compatible" 6 Please note that when you encounter any of the error scenarios and get the control in the "onFailure()" method, you should redirect the user to your alternate verification flow. **Exceptions** In case you face any of the following run time exceptions, please follow the recommended steps as mentioned below : _"No compatible client available. Please change your scope"_ As the exception suggests, you are trying to call an SDK method even though no client is available to handle it. This usually happens if you have initialized the SDK using ONLY\_TC\_USERS scope option i.e to verify only the Truecaller users, and you are not calling isOAuthFlowUsable() method before calling an SDK method. To resolve this, call isOAuthFlowUsable() before calling any SDK method if you are using VERIFY\_TC\_USERS scope option. _"Please call init() on TruecallerSDK first"_ This exception suggests that you are trying to call an SDK method before the SDK has been initialised. To resolve it, check for all possible user flows in your app which could lead to calling an SDK method directly before it has been initialised. _"Add client id in your manifest"_ This exception suggests that you are trying to call SDK initialization/build method without having your clientID mentioned in your manifest as meta-data. _"OAuth scopes cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth scopes. _"OAuth state cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth state. _“Code challenge cannot be null or empty”_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the Code challenge. [PreviousClearing SDK Instancechevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/clearing-sdk-instance) [NextIntegrating with your Backendchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/integrating-with-your-backend) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Profile | Truecaller for Developers Make a network call to fetch the userInfo using access token from step 14. The response would be corresponding to the scopes granted by the user. `GET` `https://oauth-account-noneu.truecaller.com/v1/userinfo` **Headers** Name Type Description Authorization\* "Bearer " Insert access token from the previous step - fetching user token 200: OK { “sub”: “13627101294235520", “given\_name”: “xyz”, “family\_name”: “xyz”, “phone\_number”: “91xxxxxxxxxx", “email”: “[\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) ”, “picture”: “https://www.truecaller.com/xyz”, “gender”: “male/female”, “phone\_number\_country\_code”: “IN”, “phone\_number\_verified”: true, ˇ“address”: { “locality”: “Bangalore”, “postal\_code”: “5xxxxx" } } 401: Unauthorized If authentication type is not bearer token 404: Not Found Profile information is not present for the user 500: Internal Server Error Failed to validate token due to server error 401: Unauthorized Token in invalid/ expired 422: Unprocessable Entity openid scope missing in initial request 500: Internal Server Error Unexpected error at server side **Sample cURL request :** Copy curl --location --request GET 'https://oauth-account-noneu.truecaller.com/v1/userinfo' \ --header 'Authorization: Bearer testtoken' [PreviousFetching User Tokenchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/integrating-with-your-backend/fetching-user-token) [NextNon Truecaller User Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Token | Truecaller for Developers Using the “state” from step 10, “code verifier” from step 12, and the “authorization code” from step 9, you need to make a network call to Truecaller’s backend so as to fetch the access token : `POST` `https://oauth-account-noneu.truecaller.com/v1/token` **Headers** Name Type Description Content-Type\* application/x-www-form-urlencoded String **Request Body** Name Type Description grant\_type "authorization\_code" // hardcoded value String client\_id code Authorisation code from TcOAuthData callback from step 9 code\_verifier From step 12 200: OK Success { "access\_token": "some-access-token", "expires\_in": 3600, "token\_type": "Bearer" } 400: Bad Request - If grant type is not supported 403: Forbidden - If client id is invalid 500: Internal Server Error - Unexpected error on the server side 400: Bad Request - Some of the parameters are empty in the request 403: Forbidden Valid grant type but not allowed for the client 403: Forbidden Invalid auth code provided 403: Forbidden Invalid/expired auth code in provided 403: Forbidden Invalid/expired code verifier is provided 429: Too Many Requests If the number of requests exceeds the allowed limit 503: Service Unavailable Resource unavailable due to server-side issue **Sample cURL request :** Copy curl --location --request POST 'https://oauth-account-noneu.truecaller.com/v1/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=<>' \ --data-urlencode 'code=<>' \ --data-urlencode 'code_verifier=<>' [PreviousIntegrating with your Backendchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/integrating-with-your-backend) [NextFetching User Profilechevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/integrating-with-your-backend/fetching-user-profile) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non Truecaller User Verification | Truecaller for Developers This section defines the steps that can be used to trigger verification of non Truecaller app users which will be powered via Truecaller's drop call based verification flow In order to verify both the Truecaller users (via OAuth Flow) and the non-Truecaller users (via manual verification), follow these steps : 1. Enable the Non Truecaller user verification capability for your app, by going to your project on the Truecaller developer portal and navigating to the bottom section. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Frf1k3nzGI2Z1lhpu0ZSj%252FC.png%3Falt%3Dmedia%26token%3D8aa2cc06-2e25-40a0-9aa7-29cd79590670&width=768&dpr=3&quality=100&sign=5d9a4d47&sv=2) 1. Configure sdkOptions in the TcSdkOptions Builder and supply a value of **TcSdkOptions.OPTION\_VERIFY\_ALL\_USERS** to it like below. 1. Configure permissions required by the SDK : 1. Once you receive a callback in the `TcOAuthCallback#onVerificationRequired()`, you can initiate the verification for the user by calling the following method: Here - * the first parameter is the country code of the mobile number for which the verification needs to be triggered * the second parameter (PHONE\_NUMBER\_STRING) is the mobile number to be verified. Please ensure proper validations are in place so as to send correct phone number string to the above method, otherwise an exception would be thrown * the third parameter is an instance of VerificationCallback as defined [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ​ * the fourth parameter is an instance of FragmentActivity Please note that Truecaller OAuth SDK v3.0.0 currently supports the verification for non-Truecaller users for Indian numbers only 1. Once you initiate the verification via `TcSdk.getInstance().requestVerification()` method, you will receive either a callback in your `VerificationCallback` instance with a specific `requestType` as described below **onRequestSuccess()** method is called under any of the following scenarios - * When the OTP via Truecaller IM is successfully initiated for the input mobile number. In this case, you will get the callbackType as `VerificationCallback.TYPE_IM_OTP_INITIATED` * When the OTP via Truecaller IM is successfully detected on that device by the SDK present in your app. In this case, you will get the callbackType as `VerificationCallback.TYPE_IM_OTP_RECEIVED` * When drop call is successfully initiated for the input mobile number. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_INITIATED` * When drop call is successfully detected on that device by the SDK present in your app. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_RECEIVED` * When the verification is successful for a particular number. In this case, you will get the callbackType as `VerificationCallback.TYPE_VERIFICATION_COMPLETE` * When the user is already verified on that particular device before. In this case, you will get the callbackType as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE` When **callbackType** is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`, you will receive an additional parameter for the time to live i.e TTL (in seconds) which is passed as String extra in the `VerificationDataBundle` of `onRequestSuccess()`. This value determines amount of time left to complete the verification. You can use this value to show a waiting message to your user before they can try for another attempt. Once the TTL expires, you can either auto-retry the verification by calling the requestVerification() method automatically with the same input parameters OR you can also take the user back to the number input screen to enter a different number for verification. When the **callbackType** is `VerificationCallback.TYPE_ALREADY_VERIFIED_BEFORE` or `VerificationCallback.TYPE_VERIFICATION_COMPLETE`, it means that the user verification via Truecaller SDK is complete. In these cases, the SDK will share an additional access token with your application, which you may then use to validate the response at your server end. To fetch the access token, you may use the following code snippet : Post fetching the access token, you may perform the server side validation by referring to the steps mentioned in the later part of the documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/server-side-validation) onRequestFailure() method will be called when some error has occurred while verifying the provided mobile number. You will receive the appropriate error message from TrueException using TrueException#getExceptionMessage().For details of different possible error types you may encounter, please refer to the [TrueExceptionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/trueexception) [PreviousFetching User Profilechevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/integrating-with-your-backend/fetching-user-profile) [NextCompleting Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification/completing-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ALL_USERS) . // other customizations (if any) .build() Copy For Android 8 and above : ​ ​ ​ For Android 7 and below : ​ Copy try{ TcSdk.getInstance().requestVerification("IN", , verificationCallback, context); }catch (RuntimeException e){ Log.i(TAG, e.getMessage()); } Copy override fun onRequestSuccess(callbackType: Int,verificationDataBundle : VerificationDataBundle?) { when(callbackType){ VerificationCallback.TYPE_MISSED_CALL_INITIATED)-> { //missed-call initiated if(verificationDataBundle != null){ verificationDataBundle.getString(VerificationDataBundle.KEY_TTL); verificationDataBundle.getString(VerificationDataBundle.KEY_REQUEST_NONCE); } } VerificationCallback.TYPE_MISSED_CALL_RECEIVED)-> { //missed-call received } //OTP initiated via Truecaller IM VerificationCallback.TYPE_IM_OTP_INITIATED) -> { if(verificationDataBundle != null) { val ttl = verificationDataBundle.getString(VerificationDataBundle.KEY_TTL); val requestNonce = verificationDataBundle.getString(VerificationDataBundle.KEY_REQUEST_NONCE); } } //OTP auto-read via Truecaller IM which you can pre-fill in the OTP view VerificationCallback.TYPE_IM_OTP_RECEIVED) -> { val otp = bundle.getString(VerificationDataBundle.KEY_OTP) } VerificationCallback.TYPE_VERIFICATION_COMPLETE)-> { //verification complete } VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE)-> { //user already verified } } } override fun onRequestFailure(callbackType: Int, trueException : TrueException) { //Exception } }; Copy //For when the control goes to TYPE_ALREADY_VERIFIED_BEFORE verificationDataBundle.getProfile().accessToken //For when the control goes to TYPE_VERIFICATION_COMPLETE verificationDataBundle.getString(VerificationDataBundle.KEY_ACCESS_TOKEN) sun-brightdesktopmoon --- # Completing Verification | Truecaller for Developers 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 ). Copy 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 : Copy //In case of Verification Callback TYPE_MISSED_CALL_RECEIVED TcSdk.getInstance().verifyMissedCall(profile, verificationCallback) Copy //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 [\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) [PreviousNon Truecaller User Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification) [NextTrueExceptionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification/trueexception) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # TrueException | Truecaller for Developers Error Code Error Message Description 4 "Desired permissions are missing" When the requisite permissions are missing or not granted while making the verification request 6 “Sim state is not ready” When the SIM state on the device is not ready 7 “Airplane mode is ON” When the device is on airplane mode, hence causing missed call to not go through 2 "Phone number limit reached” When the used mobile number has exceeded the maximum number of allowed verification attempts within a span of 24 hours from the time the first verification attempt was made 2 “Request id limit reached” When the used device exceeds the maximum number of allowed verification attempts in a span of 24h 2 “Invalid partner credentials. When the partner key ( app key ) you have configured in your project is incorrect. Visit [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/generating-client-id) for more info 2 “Something went wrong: Failed to create installation.” In case of Truecaller internal service error 2 “Invalid phone number” When the input mobile number is not a valid mobile number 2 “Profile has not been created yet” When the user has been successfully verified, but for some reason their profile is not created which could be due to incorrect profile data while creating TrueProfile() in verifyMissedCall method or due to network issues 5 “Invalid Name” When the string entered in the profile builder method doesn’t follow the validation checks : { min 1 char, max 128, at least 1 alphabet required with optional numeric and special chars, cannot be all numeric or all special characters, but can be all alphabets } Refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/completing-verification) for more info [PreviousCompleting Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification/completing-verification) [NextServer Side Validationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification/server-side-validation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Server Side Validation | Truecaller for Developers Once the SDK shares the _accessToken_ for any user verified via drop call based verification flow, you can verify the authenticity of the access token by making API call from your server to Truecaller's server. The following endpoint will return phone number and country code for the given access token. **API Endpoint:** Copy "https://sdk-otp-verification-noneu.truecaller.com/v1/otp/client/installation/phoneNumberDetail/{accessToken}" **REQUEST :** **Method :** GET **Header Parameters:** **Parameter Name** **Required** **Description** **Example** clientId yes Client ID zHTqS70ca9d3e016946f19a65b01dRR5e56460 **Request Path Parameters:** **Parameter Name** **Required** **Description** **Example** accessToken yes token granted for the partner for the respective user number that initiated login "71d8367e-39f7-4de5-a3a3-2066431b9ca8" **RESPONSE:** * 200 OK - _If access token is valid_ Copy { "phoneNumber":919999XXXXX9 "countryCode":"IN" } * 404 Not Found - _If your credentials are not valid_ Copy { "code":404 "message":"Invalid partner credentials." } * 404 Not Found - _If access token is invalid_ * 500 Internal Error - _for any other internal error_ [PreviousTrueExceptionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification/trueexception) [NextInstrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/instrumentation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy { "code":1404 "message":"Invalid access token." } Copy { "code":500 "message":"error message" } sun-brightdesktopmoon --- # Instrumentation | Truecaller for Developers Quick guide on how to properly track and instrument funnel for the verification flow of users via Truecaller on your app For proper tracking of the verification funnel via Truecaller SDK on your app, we recommend you to implement tracking events for the following states : **When you are using the SDK for verification of Truecaller users only:** 1. Total users coming to your verification flow 2. Number of cases when the Truecaller app is present on your smartphone 3. Number of profile verification requests made by your app ( when `TcSdk.getInstance().isOAuthFlowUsable` method is invoked ) 4. Number of users who proceed with this flow and click Continue on the Truecaller dialog \[ for these cases, you receive a success callback with TcOAuthData response in onSuccess() callback method \] 5. Number of cases where you received any error, where you receive an error callback with TcOAuthError response in onFailure() callback method. For details on specific error codes, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/handling-error-scenarios) **When you are using the SDK for verification of non-Truecaller users also ( via drop call):** 1. Total users coming to your verification flow. 2. Number of cases, when the Truecaller app is present on your smartphone and users, get verified via the Truecaller 1-tap flow (as described in the above section) 3. Number of verification requests made by your app for a non-Truecaller user ( when `TruecallerSDK.getInstance().requestVerification()` method is invoked ). 4. Number of cases where the user is getting verified for the very first time on the current smartphone and you receive a success callback - onRequestSuccess() method ( Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ) - a.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`. This implies that a drop call has been triggered to the user's mobile number b.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_RECEIVED`. This implies that a drop call has been received on the user's mobile number on that smartphone c.) Further to the above step, you complete the user verification by invoking `TcSdk.getInstance().verifyMissedCall(profile, verificationCallback)` When the callback type you receive is either `VerificationCallback.TYPE_VERIFICATION_COMPLETE`. This implies that the verification is complete for the user d.) Number of cases where the user is already verified previously on the current smartphone and gets verified directly. In such cases, you receive the success callback - onRequestSuccess() method with callback type as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE`. [PreviousServer Side Validationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/integration-steps/non-truecaller-user-verification/server-side-validation) [NextGetting Release Readychevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Release Ready | Truecaller for Developers [Testing your verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow) [Google play store app permission declaration form](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/google-play-store-app-permission-declaration-form) [Moving to Production](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/moving-to-production) [PreviousInstrumentationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/instrumentation) [NextTesting your verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Testing your verification flow | Truecaller for Developers [Non Truecaller User Verification](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification) [Truecaller user verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [Test Setup](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousGetting Release Readychevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready) [NextNon-Truecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non-Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for non-Truecaller users If the user does not have the Truecaller app present on their device or they chose to verify using a different number than the one already verified on Truecaller app currently, they can be taken to this flow in which we provision the verification of the user by sending missed call using our infrastructure. **User verifying via Truecaller's missed call mechanism for the very first time** Proceed to the flow where the user needs to input their mobile number. Give the necessary permissions ( as described [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) ) and proceed with the verification. You would receive a missed call on the device which gets automatically detected by the SDK. Post this, you need to pass the user's first name and last name to the SDK to complete the verification **User already verified with the same credentials previously on the smartphone** Once a user's verification is completed successfully on a particular device, and they re-attempt to verify on the same app using the same credentials ( same smartphone, same mobile number ), Truecaller SDK is able to identify the user and we can tell you it's the same user. In this case, no additional missed call / OTP is needed to re-verify the user. The SDK will directly tell the status of the repeat user, and in this case returns the first name and last name of the user back to you in response. [PreviousTesting your verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow) [NextTruecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for existing Truecaller users **Truecaller app present and registration completed on Truecaller app** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should see the Truecaller profile dialog. Click on continue to complete the verification flow and ensure that the verification is completed. **Truecaller app present but registration not completed on Truecaller app** Ensure that the Truecaller app is present on your device but you have _not_ completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog, and you would receive the control in onFailureProfileShared() with the specific error code. **Truecaller app not present on the device** Remove the Truecaller app from your device. Open your app and try to initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog and should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. **Network not available on device** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Turn off the mobile data and WiFi on your device. Open your app and initiate the Truecaller verification flow. You would see the Truecaller profile dialog. Click on continue button on the dialog, you would receive control in onFailureProfileShared() method with a specific error code. **Client ID should be working fine ( onFailure() Error Type 12)** For complete details on this part, please refer [here](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) . **User wishes to proceed with another number OR does not want to share their Truecaller profile** Initiate the Truecaller verification flow in your app to invoke the Truecaller profile dialog. Click on _system back_ or _Use another mobile number_ button on the dialog to dismiss the dialog. In such a scenario, user should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. We also recommend that you go through the [FAQ section](https://docs.truecaller.com/truecaller-sdk/faqs/general) to go through some of the commonly asked questions. [arrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousNon-Truecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) [NextTest Setupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow/test-setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Test Setup | Truecaller for Developers Quick guide on getting your test setup ready to test the common verification scenarios as described in previous sections **Pre-Requisites** * We suggest you to keep handy at-least 2 android smartphones with active SIM connections. Ensure that both the smartphones have your test app installed (Integrated with Truecaller SDK) * 2 different smartphones are required so that in case you get verified on one of the smartphones, you can use the second smartphone to check for the fresh verification scenarios. **Steps to follow for testing user scenarios :** **User State** **App Scenario** **Steps** Existing Truecaller user * Install Truecaller on smartphone 'A' * Complete profile creation step on Truecaller app * Launch your application and initiate the Truecaller verification flow * Truecaller profile consent screen should appear * Tapping on Continue button should verify the user Non Truecaller User User _getting verified for the first time_ on smartphone * Take smartphone 'A' * Uninstall Truecaller app from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs & phone permissions are asked ( if not already granted ) * Allow the permissions to enable receiving a drop call * User is manually asked to enter name ( if it's a new user on your app ) * On entering the name, SDK verifies the user Non Truecaller User User _already verified_ on the smartphone and tried to re-verify _( Please ensure that you try this step only after you have performed the above step )_ * Take smartphone 'A' * Launch your application and logout from the app * Initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone Non Truecaller User User _already verified_ on the smartphone, uninstalls and re-installs the application on the device _( Please ensure that you try this step only after you have performed the 2nd step )_ * Take smartphone 'A' * Uninstall your application from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone circle-info _Wi-Fi or mobile internet should also be enabled on both the smartphones_ [PreviousTruecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [NextGoogle play store app permission declaration formchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/google-play-store-app-permission-declaration-form) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Google play store app permission declaration form | Truecaller for Developers This section is only relevant for apps who are using the Truecaller SDK for verifying non-Truecaller user as well and seek phone permissions from the users If you are using the functionality of verifying non Truecaller users also via the SDK, your app would need specific phone permissions as has been described in this [sectionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) . If you are using the Truecaller SDK for verification of existing Truecaller users only ( 1-tap flow ), you can skip this section. As you upload the new app build to PlayStore with user verification feature via Truecaller SDK and the requisite permissions, you might be asked to fill an app permission declaration form. We are sharing some tips on how to appropriately justify the need for these permissions for your verification flow : **#1: In one sentence, please describe the core functionality of your app.** To be defined by you as a publisher of your app **#2: What is the core functionality in your app requiring the Call Log and / or SMS permissions?** Mobile number verification to onboard users on This is in-line with Google’s allowed usage of this permission for account verification via phone call, as stated here: https://support.google.com/googleplay/android-developer/answer/9047303 Flow: a)Enter mobile number b)Request READ\_CALL\_LOG permission c)Initiate drop call from 3rd party service to respective number d)Drop call hits user’s device and is rejected automatically via above permission to complete verification **#3: Do any of the following disallowed use cases apply to your app’s core functionality request for Call Log or SMS permissions?** NO **#4: Do any of the following other use cases apply to your app’s core functionality request for Call Log or SMS permissions?** OTP & Account verification via Phone Call (select this from the given list of options) **#5: Is your app’s use of Call Log or SMS permissions to provide functionality required by law or regulation?** No **#6: Other** We use drop call based verification of users’ mobile number for account creation or logging into their accounts. Such method of mobile number verification results in better verification success rates in our key markets like India, etc. _Android guidelines for asking app permissions from user_ [https://developer.android.com/training/permissions/requestingarrow-up-right](https://developer.android.com/training/permissions/requesting) [PreviousTest Setupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/testing-your-verification-flow/test-setup) [NextMoving to Productionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/moving-to-production) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Moving to Production | Truecaller for Developers [PreviousGoogle play store app permission declaration formchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/google-play-store-app-permission-declaration-form) [NextOAuth SDK 3.2.0chevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0) Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # OAuth SDK 3.2.0 | Truecaller for Developers [Implementing user flow for your App](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) [Scenarios for all user verifications : Truecaller and Non Truecaller Users](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [Integration Steps](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps) [Instrumentation](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/instrumentation) [Getting Release Ready](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready) [PreviousMoving to Productionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/latest-oauth-sdk-3.2.1/getting-release-ready/moving-to-production) [NextImplementing user flow for your Appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/implementing-user-flow-for-your-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing user flow for your App | Truecaller for Developers Truecaller SDK is a mobile number verification service, without the need for any OTP whatsoever. The right way to implement Truecaller SDK in your mobile app, is to invoke mobile number verification via Truecaller at touch points, where you have your users to sign-up/ login/ checkout by verifying their mobile numbers. Let us now see an example to understand how to effectively use Truecaller SDK at such touch points in your user journey When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number based identity verification of users. Here is such an example from CentroStore - our very own in-house sample app: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F1KVL1MIKWHHX76KTm30E%252F1.jpeg%3Falt%3Dmedia%26token%3Dd95c55e4-d43c-45e6-b3d9-1621fbed65f2&width=768&dpr=3&quality=100&sign=d39e6080&sv=2) ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fo7WXd2Zi2FfkHZZ15exp%252F2.jpeg%3Falt%3Dmedia%26token%3D90743df1-23e5-41d5-9700-44b4886b3613&width=768&dpr=3&quality=100&sign=59893bf1&sv=2) **Building for Various Touch points** _a. Invoking user signup/ login/ verification via Truecaller at app onboarding_ Example: CentroStore - our very own in-house sample app When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number-based identity verification of users. Here is such an example from CetroStore. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FWe9hMyqshD98OVRG7Uiz%252F3.jpeg%3Falt%3Dmedia%26token%3D2b1a8f01-5824-4ad3-b21d-9bb67c053648&width=768&dpr=3&quality=100&sign=d9ca2645&sv=2) _b. Directly invoking verification via Truecaller_ Example : CentroStore - our very own in-house sample app CentroStore has mobile number as the primary identifier for its users. So as soon as users lands on their mobile number login/ signup screen, it invokes Verification via Truecaller, and onboards it’s users within seconds in just 1-tap. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEjoGonnuIM8soJqIE9uO%252F4.jpeg%3Falt%3Dmedia%26token%3Dd3da39c9-5239-4717-b58a-f4ced1201d01&width=768&dpr=3&quality=100&sign=fb6369d1&sv=2) _c. Performing user verification at checkout_ Example : CentroStore - our very own in-house sample app CentroStore also allows users to browse through it’s app and check for bus ETAs, without needing to sign-up or log-in. However, when users wish to purchase the ticket or travel pass, it requires users to verify their mobile number. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FqKIRQInvtNrAZ368r1cO%252F5.jpeg%3Falt%3Dmedia%26token%3Da08557eb-9277-4441-bda8-17c24215834e&width=768&dpr=3&quality=100&sign=2a93dfef&sv=2) Now that we have gone through and understood how to implement Verification via Truecaller, let’s get started with the SDK integration. [PreviousOAuth SDK 3.2.0chevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0) [NextScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers Truecaller SDK enables you to verify your user's mobile number in a seamless way. For users who have the Truecaller app present on their smartphones and are already registered Truecaller users, they get verified in a 1-tap flow (supported globally), without the need of any manual input. For users who don't have the Truecaller app present on their smartphones, the SDK enables user verification by means of a drop call, which is triggered to the user's number in the background to complete the verification flow (currently supported only for India). To understand various possible user scenarios in the user's verification flow, let's try to take the example of CentroStore. CetroStore is using Truecaller SDK for verifying the numbers of all their users. **Scenario 1** a) New user on CentroStore app and b) Truecaller app present on user's smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F0T7qa39FRammgXXTAr5G%252FScreenshot%25202024-06-07%2520103558.png%3Falt%3Dmedia%26token%3D3dcd01dd-0cc8-4e12-a64a-9c09d834fb30&width=768&dpr=3&quality=100&sign=831552c9&sv=2) **Scenario 2** a) Existing user on CentroStore app, and b) Truecaller app present on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FGd2Gedi2bFSRqKSud0Uq%252FScreenshot%25202024-06-07%2520103807.png%3Falt%3Dmedia%26token%3D80841c3b-346b-4b62-8444-3b1cde79cfc2&width=768&dpr=3&quality=100&sign=af238adb&sv=2) **Scenario 3** a) New user on CentroStore app, and b) Truecaller app NOT present on a smartphone, and user's mobile number NOT already verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEI4bnKCb43bwDYrAeDZY%252FScreenshot%25202024-06-07%2520125435.png%3Falt%3Dmedia%26token%3Dd1c1dae4-f148-405e-879e-f035403cad5c&width=768&dpr=3&quality=100&sign=34d513ef&sv=2) **Scenario 4** a) Existing user on CentroStore app, and b) Truecaller app NOT present on smartphone and user's mobile number NOT verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FTejP6sDz7ifyZoMuZBpI%252FScreenshot%25202024-06-07%2520125812.png%3Falt%3Dmedia%26token%3D899db593-7449-45df-ac4e-b58d15954f84&width=768&dpr=3&quality=100&sign=489ccb3b&sv=2) [PreviousImplementing user flow for your Appchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/implementing-user-flow-for-your-app) [NextIntegration Stepschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integration Steps | Truecaller for Developers circle-info In order to proceed with the integration, please refer to [the previous sectionsarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/implementing-user-flow-for-your-app) so as to understand various user flows and touch points in the user journey where Truecaller can be enabled. * Register on the [OAuth portalarrow-up-right](https://sdk-console-noneu.truecaller.com/) to create your business account and manage OAuth projects. * Once you have created your account, create your OAuth project & generate credentials by following the steps [here.](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) * Once you have generated the credentials, you can easily, in a few simple steps integrate the Truecaller SDK by referring to our step-by-step guide in the subsequent sections. * Post integration completion, submit your project for review and go live. [PreviousScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [NextGenerating Client IDchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/generating-client-id) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating Client ID | Truecaller for Developers To ensure the authenticity of interactions between your app and Truecaller, you need to generate a client ID from the Truecaller developer portal by following the steps below: * Go to [https://sdk-console-noneu.truecaller.com/loginarrow-up-right](https://sdk-console-noneu.truecaller.com/login) and register your account. * Once registered, log in to your account and click on the "create project” button. * Enter the project name and select the business category from the dropdown menu. This will create a new project. * On the project screen, click the “add credential” button and select the platform as Android from the dropdown menu. * On the credential section, enter the package name and the SHA1. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FNSNf4oRlLaQVErDSH90S%252FA.png%3Falt%3Dmedia%26token%3D2c794ccc-b34c-41a8-a994-8dda65fef417&width=768&dpr=3&quality=100&sign=b935eaeb&sv=2) * Your package name corresponds to the applicationId in your app level `build.gradle` file. You can get to know the SHA1 for your different app builds by following these steps : * Open your project in android studio * Open terminal * Type command `./gradlew signingReport` Once done you should be able to see the SHA1 fingerprint of your different build configurations \[ debug /release \] in the terminal window within the android studio. Once you input your app details and create the app, you will be able to see a unique "ClientID" for your app which you need to include in your project to authorise all verification requests. [PreviousIntegration Stepschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps) [NextSetupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Setup | Truecaller for Developers 1. Ensure that your Minimum SDK version is at least API level 24 or above. In case your android project compiles for API level below 24, you can include the following line in your AndroidManifest.xml file to avoid any compilation issues : `` Using this would ensure that the SDK works normally for API level 24 & above, and would be disabled for API level < 24. Note: Please make sure that you put the necessary API level checks before accessing the SDK methods in case of compiling for API level < 24 2. **2.1)** Add the Truecaller SDK which contains OAuth functionality to your **app-level build.gradle** file `dependencies {` `...` `implementation "com.truecaller.android.sdk:truecaller-sdk:3.2.0"` `}` **2.2)** Also, add the following lines of code in your gradle file, if not already present `android{` `compileOptions{` `sourceCompatibility JavaVersion.VERSION_1_8` `targetCompatibility JavaVersion.VERSION_1_8` `}` `}` 3. Add mavenCentral() in your project level **build.gradle** file : `allprojects{` `repositories{` `...` `mavenCentral()` `...` `}` Also check your AGP and distribution URL version AGP : 7.4.2 (minimum) distributionUrl=https\\://[services.gradle.org/distributions/gradle-7.5-bin.ziparrow-up-right](http://services.gradle.org/distributions/gradle-7.5-bin.zip) (minimum). 4. **Configure Client ID :** a.) Open your strings.xml file. Example path: /app/src/main/res/values/strings.xml and add a new string with the name "clientID" and value as your "clientID" b.) Open your AndroidManifest.xml and add a meta-data element to the application element `...` `` `...` [PreviousGenerating Client IDchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/generating-client-id) [NextImplementing Callbackschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/implementing-callbacks) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing Callbacks | Truecaller for Developers 1. In your Activity/Fragment where you want to integrate the Truecaller OAuth flow, either make the component implement the interface TcOAuthCallback or create an instance of it which you would require to initialize TcSdkOptions in the next step. The interface has 2 functions which need to be overridden - Copy private val tcOAuthCallback: TcOAuthCallback = object : TcOAuthCallback { override fun onSuccess(tcOAuthData: TcOAuthData) { .. } override fun onFailure(tcOAuthError: TcOAuthError) { .. } } * _onFailure()_ method will be called in case of an error. You would get the error details like the error code and error message through tcOAuthError returned with this method. * _onSuccess()_ method will be called when the user gives consent to authorize your app by tapping on the primary button on the Truecaller’s consent screen, and subsequently, an authorization code will be successfully generated and received. This method would return tcOAuthData, which contains information like : **Auth Parameters** \[Live\] * authorizationCode - which you can utilize to fetch the user’s access token * scopesGranted - list of scopes granted by the user * state - state parameter returned by the authorisation server. If the state set by your application is the same as the state returned by the authorisation server, it’s safe to proceed further. If state parameters are different, someone else has initiated the request and it could be a case of request forgery. **\[New\] Sim Info Parameters**\[EAP - for access, mail us at [\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection)\ \] * Sim Status - This will be a parameter returned to you in successCallback, which helps understand whether the number passed to you is actually present on the device at the time of verification. In case it is present, the variable returns 1, In case it's not present, the variable returns 0, and in case, due to OS level restrictions, the SDK is not able to detect it, the variable returns -1 1. Call onActivityResultObtained() within the registerForActivityResult() like below: and then assign it to a variable (Ex: launcher) to use it under step 13 ([Invocationarrow-up-right](https://docs.truecaller.com/truecaller-sdk/~/revisions/nSPuRXISTt65PkMyKKJS/android/oauth-sdk-3.2.0/integration-steps/invocation) ). [PreviousSetupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/setup) [NextInitialisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/initialisation) Last updated 5 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val launcher = registerForActivityResult(StartActivityForResult()) { result: ActivityResult -> TcSdk.getInstance().onActivityResultObtained(requireActivity(), result.resultCode, result.data) } sun-brightdesktopmoon --- # Initialisation | Truecaller for Developers 1. Create a TcSdkOptions object by using the tcOAuthCallback from the previous step and provide the context. Supply the appropriate customization settings to the relevant methods of TcSdkOptions and use the instance of tcSdkOptions to initialize the TcSdk in the next step. Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .buttonColor(Color.parseColor("<>")) .buttonTextColor(Color.parseColor("<>")) .loginTextPrefix(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .ctaText(TcSdkOptions.CTA_TEXT_CONTINUE) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_SKIP) .consentTitleOption(TcSdkOptions.SDK_CONSENT_TITLE_LOG_IN) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .build(); In case you do not wish to provide any customization settings and fall back to the default SDK settings, you may simply call - Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback).build() 1. Initialize TcSdk using the tcSdkOptions from the previous step : Copy TcSdk.init(tcSdkOptions) Note: Truecaller OAuth SDK needs to be initialized only once in the component and the same instance can be accessed without the need to initialize it again, via **TcSdk.getInstance()** Ideally, you should call the init() method when the component is getting created/initialized to avoid calling it multiple times. The SDK init should always happen in a background thread. You can refer to an example snippet below \[Recommended\] : Copy launch { withContext(Dispatchers.IO) { TcSdk.init(tcSdkOptions) } // Now can access TcSdk.getInstance() } 1. Once the SDK is initialized, check whether the OAuth functionality is usable or not by calling : If _isUsable_ is True, you can proceed with further steps, otherwise, you’d have to fall back to some other mechanism ( your fallback verification flow ). Calling other SDK methods when isUsable is False would result in an exception, so please ensure to call this soon after initializing the SDK, and proceed to further steps only if this method returns True. [PreviousImplementing Callbackschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/implementing-callbacks) [NextSetting up OAuth parameterschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/setting-up-oauth-parameters) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val isUsable = TcSdk.getInstance().isOAuthFlowUsable sun-brightdesktopmoon --- # Setting up OAuth parameters | Truecaller for Developers 1. Set a unique state parameter & store it in the current session to use it later in the onSuccess() callback method of the TcOAuthCallback to match if the state received from the authorization server is the same as set here to prevent request forgery attacks. Copy stateRequested = BigInteger(130, SecureRandom()).toString(32) TcSdk.getInstance().setOAuthState(stateRequested) One good choice for a state token is a string of around 32 characters constructed using a high-quality random-number generator as we did above. Another approach could be a hash generated by signing some of your session state variables with a key that is kept secret on your back-end. circle-exclamation Truecaller OAuth SDK already verifies the request-response correlation before forwarding it to the your app. 1. Set the list of scopes to be requested. Copy TcSdk.getInstance().setOAuthScopes(arrayOf("profile", "phone", ...)) // Currently available list of scopes : - profile - phone - openid - offline_access - email - address Note : Please include the relevant scopes for your project. Make sure the scopes you’re requesting above are selected on the portal for your project 1. Generate a unique code verifier & store it in the current session since it would be required later to generate the access token. It can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method generates a random code verifier string using SecureRandom as the source of entropy with 64 as the default entropy quantity. 1. Set the corresponding code challenge using the code verifier generated in the previous step. This can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method produces a code challenge from the supplied code verifier using SHA-256 as the challenge method and Base64 as encoding if the system supports it (all Android devices should ideally support SHA-256 and Base64), but in rare case if the device doesn’t, then this method would return null meaning that you can’t proceed further. Please ensure to have a null safe check for such cases. [PreviousInitialisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/initialisation) [NextInvocationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/invocation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy codeVerifier = CodeVerifierUtil.generateRandomCodeVerifier() Copy val codeChallenge = CodeVerifierUtil.getCodeChallenge(codeVerifier) codeChallenge?.let { TcSdk.getInstance().setCodeChallenge(it) } ?: print(“Code challenge is Null. Can’t proceed further”) sun-brightdesktopmoon --- # Invocation | Truecaller for Developers 1. You can trigger the Truecaller profile verification dialog anywhere in your app flow by calling the following method Copy TcSdk.getInstance().getAuthorizationCode(this, launcher) where the launcher is derived in step 5 ([Implementing Callbackarrow-up-right](https://docs.truecaller.com/truecaller-sdk/~/revisions/nSPuRXISTt65PkMyKKJS/android/oauth-sdk-3.2.0/integration-steps/implementing-callbacks) ) In case isOAuthFlowUsable() method returns false, implying that the Truecaller app is not present on the device, you can take the user to your app screen and continue with the verification flow for non-Truecaller users or implement your fallback verification mechanism. circle-info Please note that the instance you pass in the method above should be of the activity/fragment where you have initialized the SDK. [PreviousSetting up OAuth parameterschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/setting-up-oauth-parameters) [NextCustomisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/customisation) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Clearing SDK Instance | Truecaller for Developers In order to clear the resources taken up by the SDK, you may use the following method `TcSdk.clear()` Ideally, you should call this method when the component in which you initialized the SDK is getting killed/destroyed. For instance, if you have initialized the SDK in the onCreate() method of the activity lifecycle, then you need to call clear it in the onDestroy() method of the activity lifecycle. [PreviousCustomisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/customisation) [NextHandling Error Scenarioschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/handling-error-scenarios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Customisation | Truecaller for Developers Truecaller SDK provides you with capabilities to configure the following: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FlaFG2xmhOyuNRXaxPju6%252FB.jpeg%3Falt%3Dmedia%26token%3Dab5338c8-42be-4478-baf3-31941a0aa7db&width=768&dpr=3&quality=100&sign=824c25dc&sv=2) Refer to the section below for details on all the customization capabilities and the possible values you may set: Copy TcSdkOptions.Builder(this, tcOAuthCallback) .consentMode(TcSdkOptions.CONSENT_MODE_BOTTOMSHEET) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_ANOTHER_MOBILE_NO) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .ctaText(TcSdkOptions.CTA_TEXT_ACCEPT) .heading(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .buttonColor(1111) .buttonTextColor(1111) .build() **Consent Mode Style \[ .consentMode() \]** To align the consent screen with your UX, which could either be centrally or bottom aligned, choose either of the consent screens, making the SDK integration more homogeneous with your app UX. Consent Mode Value Consent Mode - Center PopUp TcSdkOptions.CONSENT\_MODE\_POPUP Consent Mode - Bottomsheet TcSdkOptions.CONSENT\_MODE\_BOTTOMSHEET **Contextual header \[ .heading() \]** To provide the appropriate context of verification to the Truecaller user, use one of the below mentioned TruecallerSdkScope values to show the corresponding message to the user Log in to TcSdkOptions.SDK\_CONSENT\_HEADING\_LOG\_IN\_TO Sign up with TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGNUP\_WITH Sign in to TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGN\_IN\_TO Verify number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_NUMBER\_WITH Register with TcSdkOptions.SDK\_CONSENT\_HEADING\_REGISTER\_WITH Get started with TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_STARTED\_WITH Proceed with TcSdkOptions.SDK\_CONSENT\_HEADING\_PROCEED\_WITH Verify with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_WITH Verify profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PROFILE\_WITH Verify your profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_PROFILE\_WITH Verify your phone number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PHONE\_NO\_WITH Verify your number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_NO\_WITH Continue with TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_WITH Complete order with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_ORDER\_WITH Place order with TcSdkOptions.SDK\_CONSENT\_HEADING\_PLACE\_ORDER\_WITH Complete booking with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_BOOKING\_WITH Checkout with TcSdkOptions.SDK\_CONSENT\_HEADING\_CHECKOUT\_WITH Manage Details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_DETAILS\_WITH Manage your details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_YOUR\_DETAILS\_WITH Login to <> with one tap TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_TO\_WITH\_ONE\_TAP Subscribe to TcSdkOptions.SDK\_CONSENT\_HEADING\_SUBSCRIBE\_TO Get updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_UPDATES\_FROM Continue reading on TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_READING\_ON Get new updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_NEW\_UPDATES\_FROM Log in/ Signup with TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_SIGNUP\_WITH **Button text options \[ .ctaTextPrefix() \]** To set the prefix on the CTA button Continue TcSdkOptions.CTA\_TEXT\_CONTINUE Proceed TcSdkOptions.CTA\_TEXT\_PROCEED Accept TcSdkOptions.CTA\_TEXT\_ACCEPT Confirm TcSdkOptions.CTA\_TEXT\_COFIRM **Button shape \[ .buttonShapeOptions() \]** To chose the shape of the CTA button Round TcSdkOptions.BUTTON\_SHAPE\_ROUNDED Rectangle TcSdkOptions.BUTTON\_SHAPE\_RECTANGLE **Footer CTA text \[ .footerType() \]** To configure the text of the additional footer CTA present at the bottom Use another number TcSdkOptions.FOOTER\_TYPE\_CONTINUE Use another method TcSdkOptions.FOOTER\_TYPE\_ANOTHER\_METHOD Enter details manually TcSdkOptions.FOOTER\_TYPE\_MANUALLY Later TcSdkOptions.FOOTER\_TYPE\_LATER **Dark Theme** To set the consent screen in dark mode, you can call `TcSdk.getInstance().setTheme(OAuthThemeOptions.DARK)` just before calling the `TcSdk.getInstance().getAuthorizationCode(this, launcher)` By default, the SDK is configured with the light theme. **Privacy policy :** To add your privacy policy link on the verification screen, you can configure the respective hyperlink from your developer account **Terms of service:** To add your terms of service link on the verification screen, you can configure the respective hyperlink from your developer account **Language:** You can optionally customize the consent screen in any of the supported languages. To do so, add the following line : Copy Currently supported languages: english en hindi hi marathi mr telugu te malayalam ml urdu ur punjabi pa tamil ta bengali bn kannada kn swahili sw arabic ar [PreviousInvocationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/invocation) [NextClearing SDK Instancechevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/clearing-sdk-instance) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val locale = Locale("hi") // change language to Hindi TcSdk.getInstance().setLocale(locale) sun-brightdesktopmoon --- # Handling Error Scenarios | Truecaller for Developers **Failure/ Error responses** The "onFailure" callback method that you just implemented in the previous step helps you to handle all the possible failure cases when the user couldn't be verified successfully via the Truecaller flow. Below are some of the possible failure scenarios and the corresponding error response that you receive for each of the cases : Error Description Error Code "Something went wrong" 0 "Device is not supported" 16 "Truecaller user has an invalid account state" 10 "Invalid partner or partner information is missing" 12 "Conflicting request code possible in onActivityResult()" 6 "Truecaller app closed unexpectedly" 7 "Truecaller app is not installed/loggedin" 5 "User denied by pressing the footer button" 11 "User denied by dismissing consent screen" 14 "User denied while loading" 2 "Truecaller sdk is old and not compatible" 6 Please note that when you encounter any of the error scenarios and get the control in the "onFailure()" method, you should redirect the user to your alternate verification flow. **Exceptions** In case you face any of the following run time exceptions, please follow the recommended steps as mentioned below : _"No compatible client available. Please change your scope"_ As the exception suggests, you are trying to call an SDK method even though no client is available to handle it. This usually happens if you have initialized the SDK using ONLY\_TC\_USERS scope option i.e to verify only the Truecaller users, and you are not calling isOAuthFlowUsable() method before calling an SDK method. To resolve this, call isOAuthFlowUsable() before calling any SDK method if you are using VERIFY\_TC\_USERS scope option. _"Please call init() on TruecallerSDK first"_ This exception suggests that you are trying to call an SDK method before the SDK has been initialised. To resolve it, check for all possible user flows in your app which could lead to calling an SDK method directly before it has been initialised. _"Add client id in your manifest"_ This exception suggests that you are trying to call SDK initialization/build method without having your clientID mentioned in your manifest as meta-data. _"OAuth scopes cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth scopes. _"OAuth state cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth state. _“Code challenge cannot be null or empty”_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the Code challenge. [PreviousClearing SDK Instancechevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/clearing-sdk-instance) [NextIntegrating with your Backendchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/integrating-with-your-backend) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integrating with your Backend | Truecaller for Developers [Fetching User Token](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-token) [Fetching User Profile](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-profile) [PreviousHandling Error Scenarioschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/handling-error-scenarios) [NextFetching User Tokenchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/integrating-with-your-backend/fetching-user-token) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Token | Truecaller for Developers Using the “state” from step 10, “code verifier” from step 12, and the “authorization code” from step 9, you need to make a network call to Truecaller’s backend so as to fetch the access token : `POST` `https://oauth-account-noneu.truecaller.com/v1/token` **Headers** Name Type Description Content-Type\* application/x-www-form-urlencoded String **Request Body** Name Type Description grant\_type "authorization\_code" // hardcoded value String client\_id code Authorisation code from TcOAuthData callback from step 9 code\_verifier From step 12 200: OK Success { "access\_token": "some-access-token", "expires\_in": 3600, "token\_type": "Bearer" } 400: Bad Request - If grant type is not supported 403: Forbidden - If client id is invalid 500: Internal Server Error - Unexpected error on the server side 400: Bad Request - Some of the parameters are empty in the request 403: Forbidden Valid grant type but not allowed for the client 403: Forbidden Invalid auth code provided 403: Forbidden Invalid/expired auth code in provided 403: Forbidden Invalid/expired code verifier is provided 429: Too Many Requests If the number of requests exceeds the allowed limit 503: Service Unavailable Resource unavailable due to server-side issue **Sample cURL request :** Copy curl --location --request POST 'https://oauth-account-noneu.truecaller.com/v1/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=<>' \ --data-urlencode 'code=<>' \ --data-urlencode 'code_verifier=<>' [PreviousIntegrating with your Backendchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/integrating-with-your-backend) [NextFetching User Profilechevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/integrating-with-your-backend/fetching-user-profile) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Profile | Truecaller for Developers Make a network call to fetch the userInfo using access token from step 14. The response would be corresponding to the scopes granted by the user. `GET` `https://oauth-account-noneu.truecaller.com/v1/userinfo` **Headers** Name Type Description Authorization\* "Bearer " Insert access token from the previous step - fetching user token 200: OK { “sub”: “13627101294235520", “given\_name”: “xyz”, “family\_name”: “xyz”, “phone\_number”: “91xxxxxxxxxx", “email”: “[\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) ”, “picture”: “https://www.truecaller.com/xyz”, “gender”: “male/female”, “phone\_number\_country\_code”: “IN”, “phone\_number\_verified”: true, ˇ“address”: { “locality”: “Bangalore”, “postal\_code”: “5xxxxx" } } 401: Unauthorized If authentication type is not bearer token 404: Not Found Profile information is not present for the user 500: Internal Server Error Failed to validate token due to server error 401: Unauthorized Token in invalid/ expired 422: Unprocessable Entity openid scope missing in initial request 500: Internal Server Error Unexpected error at server side **Sample cURL request :** Copy curl --location --request GET 'https://oauth-account-noneu.truecaller.com/v1/userinfo' \ --header 'Authorization: Bearer testtoken' [PreviousFetching User Tokenchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/integrating-with-your-backend/fetching-user-token) [NextNon Truecaller User Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non Truecaller User Verification | Truecaller for Developers This section defines the steps that can be used to trigger verification of non Truecaller app users which will be powered via Truecaller's drop call based verification flow In order to verify both the Truecaller users (via OAuth Flow) and the non-Truecaller users (via manual verification), follow these steps : 1. Enable the Non Truecaller user verification capability for your app, by going to your project on the Truecaller developer portal and navigating to the bottom section. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Frf1k3nzGI2Z1lhpu0ZSj%252FC.png%3Falt%3Dmedia%26token%3D8aa2cc06-2e25-40a0-9aa7-29cd79590670&width=768&dpr=3&quality=100&sign=5d9a4d47&sv=2) 1. Configure sdkOptions in the TcSdkOptions Builder and supply a value of **TcSdkOptions.OPTION\_VERIFY\_ALL\_USERS** to it like below. 1. Configure permissions required by the SDK : 1. Once you receive a callback in the `TcOAuthCallback#onVerificationRequired()`, you can initiate the verification for the user by calling the following method: Here - * the first parameter is the country code of the mobile number for which the verification needs to be triggered * the second parameter (PHONE\_NUMBER\_STRING) is the mobile number to be verified. Please ensure proper validations are in place so as to send correct phone number string to the above method, otherwise an exception would be thrown * the third parameter is an instance of VerificationCallback as defined [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ​ * the fourth parameter is an instance of FragmentActivity Please note that Truecaller OAuth SDK v3.0.0 currently supports the verification for non-Truecaller users for Indian numbers only 1. Once you initiate the verification via `TcSdk.getInstance().requestVerification()` method, you will receive either a callback in your `VerificationCallback` instance with a specific `requestType` as described below **onRequestSuccess()** method is called under any of the following scenarios - * When the OTP via Truecaller IM is successfully initiated for the input mobile number. In this case, you will get the callbackType as `VerificationCallback.TYPE_IM_OTP_INITIATED` * When the OTP via Truecaller IM is successfully detected on that device by the SDK present in your app. In this case, you will get the callbackType as `VerificationCallback.TYPE_IM_OTP_RECEIVED` * When drop call is successfully initiated for the input mobile number. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_INITIATED` * When drop call is successfully detected on that device by the SDK present in your app. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_RECEIVED` * When the verification is successful for a particular number. In this case, you will get the callbackType as `VerificationCallback.TYPE_VERIFICATION_COMPLETE` * When the user is already verified on that particular device before. In this case, you will get the callbackType as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE` When **callbackType** is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`, you will receive an additional parameter for the time to live i.e TTL (in seconds) which is passed as String extra in the `VerificationDataBundle` of `onRequestSuccess()`. This value determines amount of time left to complete the verification. You can use this value to show a waiting message to your user before they can try for another attempt. Once the TTL expires, you can either auto-retry the verification by calling the requestVerification() method automatically with the same input parameters OR you can also take the user back to the number input screen to enter a different number for verification. When the **callbackType** is `VerificationCallback.TYPE_ALREADY_VERIFIED_BEFORE` or `VerificationCallback.TYPE_VERIFICATION_COMPLETE`, it means that the user verification via Truecaller SDK is complete. In these cases, the SDK will share an additional access token with your application, which you may then use to validate the response at your server end. To fetch the access token, you may use the following code snippet : Post fetching the access token, you may perform the server side validation by referring to the steps mentioned in the later part of the documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/server-side-validation) onRequestFailure() method will be called when some error has occurred while verifying the provided mobile number. You will receive the appropriate error message from TrueException using TrueException#getExceptionMessage().For details of different possible error types you may encounter, please refer to the [TrueExceptionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/trueexception) [PreviousFetching User Profilechevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/integrating-with-your-backend/fetching-user-profile) [NextCompleting Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification/completing-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ALL_USERS) . // other customizations (if any) .build() Copy For Android 8 and above : ​ ​ ​ For Android 7 and below : ​ Copy try{ TcSdk.getInstance().requestVerification("IN", , verificationCallback, context); }catch (RuntimeException e){ Log.i(TAG, e.getMessage()); } Copy override fun onRequestSuccess(callbackType: Int,verificationDataBundle : VerificationDataBundle?) { when(callbackType){ VerificationCallback.TYPE_MISSED_CALL_INITIATED)-> { //missed-call initiated if(verificationDataBundle != null){ verificationDataBundle.getString(VerificationDataBundle.KEY_TTL); verificationDataBundle.getString(VerificationDataBundle.KEY_REQUEST_NONCE); } } VerificationCallback.TYPE_MISSED_CALL_RECEIVED)-> { //missed-call received } //OTP initiated via Truecaller IM VerificationCallback.TYPE_IM_OTP_INITIATED) -> { if(verificationDataBundle != null) { val ttl = verificationDataBundle.getString(VerificationDataBundle.KEY_TTL); val requestNonce = verificationDataBundle.getString(VerificationDataBundle.KEY_REQUEST_NONCE); } } //OTP auto-read via Truecaller IM which you can pre-fill in the OTP view VerificationCallback.TYPE_IM_OTP_RECEIVED) -> { val otp = bundle.getString(VerificationDataBundle.KEY_OTP) } VerificationCallback.TYPE_VERIFICATION_COMPLETE)-> { //verification complete } VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE)-> { //user already verified } } } override fun onRequestFailure(callbackType: Int, trueException : TrueException) { //Exception } }; Copy //For when the control goes to TYPE_ALREADY_VERIFIED_BEFORE verificationDataBundle.getProfile().accessToken //For when the control goes to TYPE_VERIFICATION_COMPLETE verificationDataBundle.getString(VerificationDataBundle.KEY_ACCESS_TOKEN) sun-brightdesktopmoon --- # Completing Verification | Truecaller for Developers 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 ). Copy 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 : Copy //In case of Verification Callback TYPE_MISSED_CALL_RECEIVED TcSdk.getInstance().verifyMissedCall(profile, verificationCallback) Copy //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 [\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) [PreviousNon Truecaller User Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification) [NextTrueExceptionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification/trueexception) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Instrumentation | Truecaller for Developers Quick guide on how to properly track and instrument funnel for the verification flow of users via Truecaller on your app For proper tracking of the verification funnel via Truecaller SDK on your app, we recommend you to implement tracking events for the following states : **When you are using the SDK for verification of Truecaller users only:** 1. Total users coming to your verification flow 2. Number of cases when the Truecaller app is present on your smartphone 3. Number of profile verification requests made by your app ( when `TcSdk.getInstance().isOAuthFlowUsable` method is invoked ) 4. Number of users who proceed with this flow and click Continue on the Truecaller dialog \[ for these cases, you receive a success callback with TcOAuthData response in onSuccess() callback method \] 5. Number of cases where you received any error, where you receive an error callback with TcOAuthError response in onFailure() callback method. For details on specific error codes, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/handling-error-scenarios) **When you are using the SDK for verification of non-Truecaller users also ( via drop call):** 1. Total users coming to your verification flow. 2. Number of cases, when the Truecaller app is present on your smartphone and users, get verified via the Truecaller 1-tap flow (as described in the above section) 3. Number of verification requests made by your app for a non-Truecaller user ( when `TruecallerSDK.getInstance().requestVerification()` method is invoked ). 4. Number of cases where the user is getting verified for the very first time on the current smartphone and you receive a success callback - onRequestSuccess() method ( Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ) - a.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`. This implies that a drop call has been triggered to the user's mobile number b.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_RECEIVED`. This implies that a drop call has been received on the user's mobile number on that smartphone c.) Further to the above step, you complete the user verification by invoking `TcSdk.getInstance().verifyMissedCall(profile, verificationCallback)` When the callback type you receive is either `VerificationCallback.TYPE_VERIFICATION_COMPLETE`. This implies that the verification is complete for the user d.) Number of cases where the user is already verified previously on the current smartphone and gets verified directly. In such cases, you receive the success callback - onRequestSuccess() method with callback type as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE`. [PreviousServer Side Validationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification/server-side-validation) [NextGetting Release Readychevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Server Side Validation | Truecaller for Developers Once the SDK shares the _accessToken_ for any user verified via drop call based verification flow, you can verify the authenticity of the access token by making API call from your server to Truecaller's server. The following endpoint will return phone number and country code for the given access token. **API Endpoint:** Copy "https://sdk-otp-verification-noneu.truecaller.com/v1/otp/client/installation/phoneNumberDetail/{accessToken}" **REQUEST :** **Method :** GET **Header Parameters:** **Parameter Name** **Required** **Description** **Example** clientId yes Client ID zHTqS70ca9d3e016946f19a65b01dRR5e56460 **Request Path Parameters:** **Parameter Name** **Required** **Description** **Example** accessToken yes token granted for the partner for the respective user number that initiated login "71d8367e-39f7-4de5-a3a3-2066431b9ca8" **RESPONSE:** * 200 OK - _If access token is valid_ Copy { "phoneNumber":919999XXXXX9 "countryCode":"IN" } * 404 Not Found - _If your credentials are not valid_ Copy { "code":404 "message":"Invalid partner credentials." } * 404 Not Found - _If access token is invalid_ * 500 Internal Error - _for any other internal error_ [PreviousTrueExceptionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification/trueexception) [NextInstrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/instrumentation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy { "code":1404 "message":"Invalid access token." } Copy { "code":500 "message":"error message" } sun-brightdesktopmoon --- # TrueException | Truecaller for Developers Error Code Error Message Description 4 "Desired permissions are missing" When the requisite permissions are missing or not granted while making the verification request 6 “Sim state is not ready” When the SIM state on the device is not ready 7 “Airplane mode is ON” When the device is on airplane mode, hence causing missed call to not go through 2 "Phone number limit reached” When the used mobile number has exceeded the maximum number of allowed verification attempts within a span of 24 hours from the time the first verification attempt was made 2 “Request id limit reached” When the used device exceeds the maximum number of allowed verification attempts in a span of 24h 2 “Invalid partner credentials. When the partner key ( app key ) you have configured in your project is incorrect. Visit [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/generating-client-id) for more info 2 “Something went wrong: Failed to create installation.” In case of Truecaller internal service error 2 “Invalid phone number” When the input mobile number is not a valid mobile number 2 “Profile has not been created yet” When the user has been successfully verified, but for some reason their profile is not created which could be due to incorrect profile data while creating TrueProfile() in verifyMissedCall method or due to network issues 5 “Invalid Name” When the string entered in the profile builder method doesn’t follow the validation checks : { min 1 char, max 128, at least 1 alphabet required with optional numeric and special chars, cannot be all numeric or all special characters, but can be all alphabets } Refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/completing-verification) for more info [PreviousCompleting Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification/completing-verification) [NextServer Side Validationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/non-truecaller-user-verification/server-side-validation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Moving to Production | Truecaller for Developers [PreviousGoogle play store app permission declaration formchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/google-play-store-app-permission-declaration-form) [NextOAuth SDK 3.1.0chevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0) Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing user flow for your App | Truecaller for Developers Truecaller SDK is a mobile number verification service, without the need for any OTP whatsoever. The right way to implement Truecaller SDK in your mobile app, is to invoke mobile number verification via Truecaller at touch points, where you have your users to sign-up/ login/ checkout by verifying their mobile numbers. Let us now see an example to understand how to effectively use Truecaller SDK at such touch points in your user journey When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number based identity verification of users. Here is such an example from CentroStore - our very own in-house sample app: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F1KVL1MIKWHHX76KTm30E%252F1.jpeg%3Falt%3Dmedia%26token%3Dd95c55e4-d43c-45e6-b3d9-1621fbed65f2&width=768&dpr=3&quality=100&sign=d39e6080&sv=2) ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fo7WXd2Zi2FfkHZZ15exp%252F2.jpeg%3Falt%3Dmedia%26token%3D90743df1-23e5-41d5-9700-44b4886b3613&width=768&dpr=3&quality=100&sign=59893bf1&sv=2) **Building for Various Touch points** _a. Invoking user signup/ login/ verification via Truecaller at app onboarding_ Example: CentroStore - our very own in-house sample app When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number-based identity verification of users. Here is such an example from CetroStore. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FWe9hMyqshD98OVRG7Uiz%252F3.jpeg%3Falt%3Dmedia%26token%3D2b1a8f01-5824-4ad3-b21d-9bb67c053648&width=768&dpr=3&quality=100&sign=d9ca2645&sv=2) _b. Directly invoking verification via Truecaller_ Example : CentroStore - our very own in-house sample app CentroStore has mobile number as the primary identifier for its users. So as soon as users lands on their mobile number login/ signup screen, it invokes Verification via Truecaller, and onboards it’s users within seconds in just 1-tap. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEjoGonnuIM8soJqIE9uO%252F4.jpeg%3Falt%3Dmedia%26token%3Dd3da39c9-5239-4717-b58a-f4ced1201d01&width=768&dpr=3&quality=100&sign=fb6369d1&sv=2) _c. Performing user verification at checkout_ Example : CentroStore - our very own in-house sample app CentroStore also allows users to browse through it’s app and check for bus ETAs, without needing to sign-up or log-in. However, when users wish to purchase the ticket or travel pass, it requires users to verify their mobile number. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FqKIRQInvtNrAZ368r1cO%252F5.jpeg%3Falt%3Dmedia%26token%3Da08557eb-9277-4441-bda8-17c24215834e&width=768&dpr=3&quality=100&sign=2a93dfef&sv=2) Now that we have gone through and understood how to implement Verification via Truecaller, let’s get started with the SDK integration. [PreviousOAuth SDK 3.1.0chevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0) [NextScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Testing your verification flow | Truecaller for Developers [Non Truecaller User Verification](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification) [Truecaller user verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [Test Setup](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousGetting Release Readychevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready) [NextNon-Truecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non-Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for non-Truecaller users If the user does not have the Truecaller app present on their device or they chose to verify using a different number than the one already verified on Truecaller app currently, they can be taken to this flow in which we provision the verification of the user by sending missed call using our infrastructure. **User verifying via Truecaller's missed call mechanism for the very first time** Proceed to the flow where the user needs to input their mobile number. Give the necessary permissions ( as described [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) ) and proceed with the verification. You would receive a missed call on the device which gets automatically detected by the SDK. Post this, you need to pass the user's first name and last name to the SDK to complete the verification **User already verified with the same credentials previously on the smartphone** Once a user's verification is completed successfully on a particular device, and they re-attempt to verify on the same app using the same credentials ( same smartphone, same mobile number ), Truecaller SDK is able to identify the user and we can tell you it's the same user. In this case, no additional missed call / OTP is needed to re-verify the user. The SDK will directly tell the status of the repeat user, and in this case returns the first name and last name of the user back to you in response. [PreviousTesting your verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow) [NextTruecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Release Ready | Truecaller for Developers [Testing your verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow) [Google play store app permission declaration form](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/google-play-store-app-permission-declaration-form) [Moving to Production](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/moving-to-production) [PreviousInstrumentationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/instrumentation) [NextTesting your verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for existing Truecaller users **Truecaller app present and registration completed on Truecaller app** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should see the Truecaller profile dialog. Click on continue to complete the verification flow and ensure that the verification is completed. **Truecaller app present but registration not completed on Truecaller app** Ensure that the Truecaller app is present on your device but you have _not_ completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog, and you would receive the control in onFailureProfileShared() with the specific error code. **Truecaller app not present on the device** Remove the Truecaller app from your device. Open your app and try to initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog and should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. **Network not available on device** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Turn off the mobile data and WiFi on your device. Open your app and initiate the Truecaller verification flow. You would see the Truecaller profile dialog. Click on continue button on the dialog, you would receive control in onFailureProfileShared() method with a specific error code. **Client ID should be working fine ( onFailure() Error Type 12)** For complete details on this part, please refer [here](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) . **User wishes to proceed with another number OR does not want to share their Truecaller profile** Initiate the Truecaller verification flow in your app to invoke the Truecaller profile dialog. Click on _system back_ or _Use another mobile number_ button on the dialog to dismiss the dialog. In such a scenario, user should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. We also recommend that you go through the [FAQ section](https://docs.truecaller.com/truecaller-sdk/faqs/general) to go through some of the commonly asked questions. [arrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousNon-Truecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) [NextTest Setupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow/test-setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Google play store app permission declaration form | Truecaller for Developers This section is only relevant for apps who are using the Truecaller SDK for verifying non-Truecaller user as well and seek phone permissions from the users If you are using the functionality of verifying non Truecaller users also via the SDK, your app would need specific phone permissions as has been described in this [sectionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) . If you are using the Truecaller SDK for verification of existing Truecaller users only ( 1-tap flow ), you can skip this section. As you upload the new app build to PlayStore with user verification feature via Truecaller SDK and the requisite permissions, you might be asked to fill an app permission declaration form. We are sharing some tips on how to appropriately justify the need for these permissions for your verification flow : **#1: In one sentence, please describe the core functionality of your app.** To be defined by you as a publisher of your app **#2: What is the core functionality in your app requiring the Call Log and / or SMS permissions?** Mobile number verification to onboard users on This is in-line with Google’s allowed usage of this permission for account verification via phone call, as stated here: https://support.google.com/googleplay/android-developer/answer/9047303 Flow: a)Enter mobile number b)Request READ\_CALL\_LOG permission c)Initiate drop call from 3rd party service to respective number d)Drop call hits user’s device and is rejected automatically via above permission to complete verification **#3: Do any of the following disallowed use cases apply to your app’s core functionality request for Call Log or SMS permissions?** NO **#4: Do any of the following other use cases apply to your app’s core functionality request for Call Log or SMS permissions?** OTP & Account verification via Phone Call (select this from the given list of options) **#5: Is your app’s use of Call Log or SMS permissions to provide functionality required by law or regulation?** No **#6: Other** We use drop call based verification of users’ mobile number for account creation or logging into their accounts. Such method of mobile number verification results in better verification success rates in our key markets like India, etc. _Android guidelines for asking app permissions from user_ [https://developer.android.com/training/permissions/requestingarrow-up-right](https://developer.android.com/training/permissions/requesting) [PreviousTest Setupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow/test-setup) [NextMoving to Productionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/moving-to-production) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # OAuth SDK 3.1.0 | Truecaller for Developers [Implementing user flow for your App](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) [Scenarios for all user verifications : Truecaller and Non Truecaller Users](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [Integration Steps](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps) [Instrumentation](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/instrumentation) [Getting Release Ready](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready) [PreviousMoving to Productionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/moving-to-production) [NextImplementing user flow for your Appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/implementing-user-flow-for-your-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers Truecaller SDK enables you to verify your user's mobile number in a seamless way. For users who have the Truecaller app present on their smartphones and are already registered Truecaller users, they get verified in a 1-tap flow (supported globally), without the need of any manual input. For users who don't have the Truecaller app present on their smartphones, the SDK enables user verification by means of a drop call, which is triggered to the user's number in the background to complete the verification flow (currently supported only for India). To understand various possible user scenarios in the user's verification flow, let's try to take the example of CentroStore. CetroStore is using Truecaller SDK for verifying the numbers of all their users. **Scenario 1** a) New user on CentroStore app and b) Truecaller app present on user's smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F0T7qa39FRammgXXTAr5G%252FScreenshot%25202024-06-07%2520103558.png%3Falt%3Dmedia%26token%3D3dcd01dd-0cc8-4e12-a64a-9c09d834fb30&width=768&dpr=3&quality=100&sign=831552c9&sv=2) **Scenario 2** a) Existing user on CentroStore app, and b) Truecaller app present on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FGd2Gedi2bFSRqKSud0Uq%252FScreenshot%25202024-06-07%2520103807.png%3Falt%3Dmedia%26token%3D80841c3b-346b-4b62-8444-3b1cde79cfc2&width=768&dpr=3&quality=100&sign=af238adb&sv=2) **Scenario 3** a) New user on CentroStore app, and b) Truecaller app NOT present on a smartphone, and user's mobile number NOT already verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEI4bnKCb43bwDYrAeDZY%252FScreenshot%25202024-06-07%2520125435.png%3Falt%3Dmedia%26token%3Dd1c1dae4-f148-405e-879e-f035403cad5c&width=768&dpr=3&quality=100&sign=34d513ef&sv=2) **Scenario 4** a) Existing user on CentroStore app, and b) Truecaller app NOT present on smartphone and user's mobile number NOT verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FTejP6sDz7ifyZoMuZBpI%252FScreenshot%25202024-06-07%2520125812.png%3Falt%3Dmedia%26token%3D899db593-7449-45df-ac4e-b58d15954f84&width=768&dpr=3&quality=100&sign=489ccb3b&sv=2) [PreviousImplementing user flow for your Appchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/implementing-user-flow-for-your-app) [NextIntegration Stepschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Test Setup | Truecaller for Developers Quick guide on getting your test setup ready to test the common verification scenarios as described in previous sections **Pre-Requisites** * We suggest you to keep handy at-least 2 android smartphones with active SIM connections. Ensure that both the smartphones have your test app installed (Integrated with Truecaller SDK) * 2 different smartphones are required so that in case you get verified on one of the smartphones, you can use the second smartphone to check for the fresh verification scenarios. **Steps to follow for testing user scenarios :** **User State** **App Scenario** **Steps** Existing Truecaller user * Install Truecaller on smartphone 'A' * Complete profile creation step on Truecaller app * Launch your application and initiate the Truecaller verification flow * Truecaller profile consent screen should appear * Tapping on Continue button should verify the user Non Truecaller User User _getting verified for the first time_ on smartphone * Take smartphone 'A' * Uninstall Truecaller app from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs & phone permissions are asked ( if not already granted ) * Allow the permissions to enable receiving a drop call * User is manually asked to enter name ( if it's a new user on your app ) * On entering the name, SDK verifies the user Non Truecaller User User _already verified_ on the smartphone and tried to re-verify _( Please ensure that you try this step only after you have performed the above step )_ * Take smartphone 'A' * Launch your application and logout from the app * Initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone Non Truecaller User User _already verified_ on the smartphone, uninstalls and re-installs the application on the device _( Please ensure that you try this step only after you have performed the 2nd step )_ * Take smartphone 'A' * Uninstall your application from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone circle-info _Wi-Fi or mobile internet should also be enabled on both the smartphones_ [PreviousTruecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [NextGoogle play store app permission declaration formchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/getting-release-ready/google-play-store-app-permission-declaration-form) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integration Steps | Truecaller for Developers circle-info In order to proceed with the integration, please refer to [the previous sectionsarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/implementing-user-flow-for-your-app) so as to understand various user flows and touch points in the user journey where Truecaller can be enabled. * Register on the [OAuth portalarrow-up-right](https://sdk-console-noneu.truecaller.com/) to create your business account and manage OAuth projects. * Once you have created your account, create your OAuth project & generate credentials by following the steps [here.](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) * Once you have generated the credentials, you can easily, in a few simple steps integrate the Truecaller SDK by referring to our step-by-step guide in the subsequent sections. * Post integration completion, submit your project for review and go live. [PreviousScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [NextGenerating Client IDchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/generating-client-id) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating Client ID | Truecaller for Developers To ensure the authenticity of interactions between your app and Truecaller, you need to generate a client ID from the Truecaller developer portal by following the steps below: * Go to [https://sdk-console-noneu.truecaller.com/loginarrow-up-right](https://sdk-console-noneu.truecaller.com/login) and register your account. * Once registered, log in to your account and click on the "create project” button. * Enter the project name and select the business category from the dropdown menu. This will create a new project. * On the project screen, click the “add credential” button and select the platform as Android from the dropdown menu. * On the credential section, enter the package name and the SHA1. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FNSNf4oRlLaQVErDSH90S%252FA.png%3Falt%3Dmedia%26token%3D2c794ccc-b34c-41a8-a994-8dda65fef417&width=768&dpr=3&quality=100&sign=b935eaeb&sv=2) * Your package name corresponds to the applicationId in your app level `build.gradle` file. You can get to know the SHA1 for your different app builds by following these steps : * Open your project in android studio * Open terminal * Type command `./gradlew signingReport` Once done you should be able to see the SHA1 fingerprint of your different build configurations \[ debug /release \] in the terminal window within the android studio. Once you input your app details and create the app, you will be able to see a unique "ClientID" for your app which you need to include in your project to authorise all verification requests. [PreviousIntegration Stepschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps) [NextSetupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Instrumentation | Truecaller for Developers Quick guide on how to properly track and instrument funnel for the verification flow of users via Truecaller on your app For proper tracking of the verification funnel via Truecaller SDK on your app, we recommend you to implement tracking events for the following states : **When you are using the SDK for verification of Truecaller users only:** 1. Total users coming to your verification flow 2. Number of cases when the Truecaller app is present on your smartphone 3. Number of profile verification requests made by your app ( when `TcSdk.getInstance().isOAuthFlowUsable` method is invoked ) 4. Number of users who proceed with this flow and click Continue on the Truecaller dialog \[ for these cases, you receive a success callback with TcOAuthData response in onSuccess() callback method \] 5. Number of cases where you received any error, where you receive an error callback with TcOAuthError response in onFailure() callback method. For details on specific error codes, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/handling-error-scenarios) **When you are using the SDK for verification of non-Truecaller users also ( via drop call):** 1. Total users coming to your verification flow. 2. Number of cases, when the Truecaller app is present on your smartphone and users, get verified via the Truecaller 1-tap flow (as described in the above section) 3. Number of verification requests made by your app for a non-Truecaller user ( when `TruecallerSDK.getInstance().requestVerification()` method is invoked ). 4. Number of cases where the user is getting verified for the very first time on the current smartphone and you receive a success callback - onRequestSuccess() method ( Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ) - a.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`. This implies that a drop call has been triggered to the user's mobile number b.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_RECEIVED`. This implies that a drop call has been received on the user's mobile number on that smartphone c.) Further to the above step, you complete the user verification by invoking `TcSdk.getInstance().verifyMissedCall(profile, verificationCallback)` When the callback type you receive is either `VerificationCallback.TYPE_VERIFICATION_COMPLETE`. This implies that the verification is complete for the user d.) Number of cases where the user is already verified previously on the current smartphone and gets verified directly. In such cases, you receive the success callback - onRequestSuccess() method with callback type as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE`. [PreviousServer Side Validationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification/server-side-validation) [NextGetting Release Readychevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # OAuth SDK 3.0.0 | Truecaller for Developers [Implementing user flow for your App](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) [Scenarios for all user verifications : Truecaller and Non Truecaller Users](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [Integration Steps](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps) [Instrumentation](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/instrumentation) [Getting Release Ready](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready) [PreviousMoving to Productionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/moving-to-production) [NextImplementing user flow for your Appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Moving to Production | Truecaller for Developers [PreviousGoogle play store app permission declaration formchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/google-play-store-app-permission-declaration-form) [NextOAuth SDK 3.0.0chevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0) Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing Callbacks | Truecaller for Developers 1. In your Activity/Fragment where you want to integrate the Truecaller OAuth flow, either make the component implement the interface TcOAuthCallback or create an instance of it which you would require to initialize TcSdkOptions in the next step. The interface has 2 functions which need to be overridden - Copy private val tcOAuthCallback: TcOAuthCallback = object : TcOAuthCallback { override fun onSuccess(tcOAuthData: TcOAuthData) { .. } override fun onFailure(tcOAuthError: TcOAuthError) { .. } } * _onFailure()_ method will be called in case of an error. You would get the error details like the error code and error message through tcOAuthError returned with this method. * _onSuccess()_ method will be called when the user gives consent to authorize your app by tapping on the primary button on the Truecaller’s consent screen, and subsequently, an authorization code will be successfully generated and received. This method would return tcOAuthData which contains information like : * authorizationCode - which you can utilize to fetch the user’s access token * scopesGranted - list of scopes granted by the user * state - state parameter returned by the authorisation server. If the state set by your application is the same as the state returned by the authorisation server, it’s safe to proceed further. If state parameters are different, someone else has initiated the request and it could be a case of request forgery. 1. Override the onActivityResult() method of the component used in step 1 and call the onActivityResultObtained() method if the requestCode matches to TcSdk.SHARE\_PROFILE\_REQUEST\_CODE. Copy override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (requestCode == TcSdk.SHARE_PROFILE_REQUEST_CODE) { TcSdk.getInstance().onActivityResultObtained(this, requestCode, resultCode, data) } } [PreviousSetupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/setup) [NextInitialisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/initialisation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Initialisation | Truecaller for Developers 1. Create a TcSdkOptions object by using the tcOAuthCallback from the previous step and provide the context. Supply the appropriate customization settings to the relevant methods of TcSdkOptions and use the instance of tcSdkOptions to initialize the TcSdk in the next step. Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .buttonColor(Color.parseColor("<>")) .buttonTextColor(Color.parseColor("<>")) .loginTextPrefix(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .ctaText(TcSdkOptions.CTA_TEXT_CONTINUE) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_SKIP) .consentTitleOption(TcSdkOptions.SDK_CONSENT_TITLE_LOG_IN) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .build(); In case you do not wish to provide any customization settings and fall back to the default SDK settings, you may simply call - Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback).build() 1. Initialize TcSdk using the tcSdkOptions from the previous step : Copy TcSdk.init(tcSdkOptions) Note: Truecaller OAuth SDK needs to be initialized only once in the component and the same instance can be accessed without the need to initialize it again, via **TcSdk.getInstance()** Ideally, you should call the init() method when the component is getting created/initialized to avoid calling it multiple times. The SDK init should always happen in a background thread. 1. Once the SDK is initialized, check whether the OAuth functionality is usable or not by calling : If _isUsable_ is True, you can proceed with further steps, otherwise, you’d have to fall back to some other mechanism ( your fallback verification flow ). Calling other SDK methods when isUsable is False would result in an exception, so please ensure to call this soon after initializing the SDK, and proceed to further steps only if this method returns True. [PreviousImplementing Callbackschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/implementing-callbacks) [NextSetting up OAuth parameterschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/setting-up-oauth-parameters) Last updated 11 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val isUsable = TcSdk.getInstance().isOAuthFlowUsable sun-brightdesktopmoon --- # Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers Truecaller SDK enables you to verify your user's mobile number in a seamless way. For users who have the Truecaller app present on their smartphones and are already registered Truecaller users, they get verified in a 1-tap flow (supported globally), without the need of any manual input. For users who don't have the Truecaller app present on their smartphones, the SDK enables user verification by means of a drop call, which is triggered to the user's number in the background to complete the verification flow (currently supported only for India). To understand various possible user scenarios in the user's verification flow, let's try to take the example of CentroStore. CetroStore is using Truecaller SDK for verifying the numbers of all their users. **Scenario 1** a) New user on CentroStore app and b) Truecaller app present on user's smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F0T7qa39FRammgXXTAr5G%252FScreenshot%25202024-06-07%2520103558.png%3Falt%3Dmedia%26token%3D3dcd01dd-0cc8-4e12-a64a-9c09d834fb30&width=768&dpr=3&quality=100&sign=831552c9&sv=2) **Scenario 2** a) Existing user on CentroStore app, and b) Truecaller app present on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FGd2Gedi2bFSRqKSud0Uq%252FScreenshot%25202024-06-07%2520103807.png%3Falt%3Dmedia%26token%3D80841c3b-346b-4b62-8444-3b1cde79cfc2&width=768&dpr=3&quality=100&sign=af238adb&sv=2) **Scenario 3** a) New user on CentroStore app, and b) Truecaller app NOT present on a smartphone, and user's mobile number NOT already verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEI4bnKCb43bwDYrAeDZY%252FScreenshot%25202024-06-07%2520125435.png%3Falt%3Dmedia%26token%3Dd1c1dae4-f148-405e-879e-f035403cad5c&width=768&dpr=3&quality=100&sign=34d513ef&sv=2) **Scenario 4** a) Existing user on CentroStore app, and b) Truecaller app NOT present on smartphone and user's mobile number NOT verified on smartphone ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FTejP6sDz7ifyZoMuZBpI%252FScreenshot%25202024-06-07%2520125812.png%3Falt%3Dmedia%26token%3D899db593-7449-45df-ac4e-b58d15954f84&width=768&dpr=3&quality=100&sign=489ccb3b&sv=2) [PreviousImplementing user flow for your Appchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) [NextIntegration Stepschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Release Ready | Truecaller for Developers [Testing your verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow) [Google play store app permission declaration form](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/google-play-store-app-permission-declaration-form) [Moving to Production](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/moving-to-production) [PreviousInstrumentationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/instrumentation) [NextTesting your verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integrating with your Backend | Truecaller for Developers [Fetching User Token](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-token) [Fetching User Profile](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-profile) [PreviousHandling Error Scenarioschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/handling-error-scenarios) [NextFetching User Tokenchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/integrating-with-your-backend/fetching-user-token) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Testing your verification flow | Truecaller for Developers [Non Truecaller User Verification](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification) [Truecaller user verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [Test Setup](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousGetting Release Readychevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready) [NextNon-Truecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non-Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for non-Truecaller users If the user does not have the Truecaller app present on their device or they chose to verify using a different number than the one already verified on Truecaller app currently, they can be taken to this flow in which we provision the verification of the user by sending missed call using our infrastructure. **User verifying via Truecaller's missed call mechanism for the very first time** Proceed to the flow where the user needs to input their mobile number. Give the necessary permissions ( as described [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) ) and proceed with the verification. You would receive a missed call on the device which gets automatically detected by the SDK. Post this, you need to pass the user's first name and last name to the SDK to complete the verification **User already verified with the same credentials previously on the smartphone** Once a user's verification is completed successfully on a particular device, and they re-attempt to verify on the same app using the same credentials ( same smartphone, same mobile number ), Truecaller SDK is able to identify the user and we can tell you it's the same user. In this case, no additional missed call / OTP is needed to re-verify the user. The SDK will directly tell the status of the repeat user, and in this case returns the first name and last name of the user back to you in response. [PreviousTesting your verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow) [NextTruecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Google play store app permission declaration form | Truecaller for Developers This section is only relevant for apps who are using the Truecaller SDK for verifying non-Truecaller user as well and seek phone permissions from the users If you are using the functionality of verifying non Truecaller users also via the SDK, your app would need specific phone permissions as has been described in this [sectionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) . If you are using the Truecaller SDK for verification of existing Truecaller users only ( 1-tap flow ), you can skip this section. As you upload the new app build to PlayStore with user verification feature via Truecaller SDK and the requisite permissions, you might be asked to fill an app permission declaration form. We are sharing some tips on how to appropriately justify the need for these permissions for your verification flow : **#1: In one sentence, please describe the core functionality of your app.** To be defined by you as a publisher of your app **#2: What is the core functionality in your app requiring the Call Log and / or SMS permissions?** Mobile number verification to onboard users on This is in-line with Google’s allowed usage of this permission for account verification via phone call, as stated here: https://support.google.com/googleplay/android-developer/answer/9047303 Flow: a)Enter mobile number b)Request READ\_CALL\_LOG permission c)Initiate drop call from 3rd party service to respective number d)Drop call hits user’s device and is rejected automatically via above permission to complete verification **#3: Do any of the following disallowed use cases apply to your app’s core functionality request for Call Log or SMS permissions?** NO **#4: Do any of the following other use cases apply to your app’s core functionality request for Call Log or SMS permissions?** OTP & Account verification via Phone Call (select this from the given list of options) **#5: Is your app’s use of Call Log or SMS permissions to provide functionality required by law or regulation?** No **#6: Other** We use drop call based verification of users’ mobile number for account creation or logging into their accounts. Such method of mobile number verification results in better verification success rates in our key markets like India, etc. _Android guidelines for asking app permissions from user_ [https://developer.android.com/training/permissions/requestingarrow-up-right](https://developer.android.com/training/permissions/requesting) [PreviousTest Setupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow/test-setup) [NextMoving to Productionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/moving-to-production) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # TrueException | Truecaller for Developers Error Code Error Message Description 4 "Desired permissions are missing" When the requisite permissions are missing or not granted while making the verification request 6 “Sim state is not ready” When the SIM state on the device is not ready 7 “Airplane mode is ON” When the device is on airplane mode, hence causing missed call to not go through 2 "Phone number limit reached” When the used mobile number has exceeded the maximum number of allowed verification attempts within a span of 24 hours from the time the first verification attempt was made 2 “Request id limit reached” When the used device exceeds the maximum number of allowed verification attempts in a span of 24h 2 “Invalid partner credentials. When the partner key ( app key ) you have configured in your project is incorrect. Visit [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/generating-client-id) for more info 2 “Something went wrong: Failed to create installation.” In case of Truecaller internal service error 2 “Invalid phone number” When the input mobile number is not a valid mobile number 2 “Profile has not been created yet” When the user has been successfully verified, but for some reason their profile is not created which could be due to incorrect profile data while creating TrueProfile() in verifyMissedCall method or due to network issues 5 “Invalid Name” When the string entered in the profile builder method doesn’t follow the validation checks : { min 1 char, max 128, at least 1 alphabet required with optional numeric and special chars, cannot be all numeric or all special characters, but can be all alphabets } Refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/completing-verification) for more info [PreviousCompleting Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification/completing-verification) [NextServer Side Validationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification/server-side-validation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Invocation | Truecaller for Developers 1. You can trigger the Truecaller profile verification dialog anywhere in your app flow by calling the following method Copy TcSdk.getInstance().getAuthorizationCode(this); In case isOAuthFlowUsable() method returns false, implying that Truecaller app is not present on the device, you can take the user to your app screen and continue with the verification flow for non-Truecaller users. circle-info Please note that the instance you pass in the method above should be of the activity/fragment where you have initialized the SDK. [PreviousSetting up OAuth parameterschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/setting-up-oauth-parameters) [NextCustomisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/customisation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Setting up OAuth parameters | Truecaller for Developers 1. Set a unique state parameter & store it in the current session to use it later in the onSuccess() callback method of the TcOAuthCallback to match if the state received from the authorization server is the same as set here to prevent request forgery attacks. Copy stateRequested = BigInteger(130, SecureRandom()).toString(32) TcSdk.getInstance().setOAuthState(stateRequested) One good choice for a state token is a string of around 32 characters constructed using a high-quality random-number generator as we did above. Another approach could be a hash generated by signing some of your session state variables with a key that is kept secret on your back-end. circle-exclamation Truecaller OAuth SDK already verifies the request-response correlation before forwarding it to the your app. 1. Set the list of scopes to be requested. Copy TcSdk.getInstance().setOAuthScopes(arrayOf("profile", "phone", ...)) // Currently available list of scopes : - profile - phone - openid - offline_access - email - address Note : Please include the relevant scopes for your project. Make sure the scopes you’re requesting above are selected on the portal for your project 1. Generate a unique code verifier & store it in the current session since it would be required later to generate the access token. It can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method generates a random code verifier string using SecureRandom as the source of entropy with 64 as the default entropy quantity. 1. Set the corresponding code challenge using the code verifier generated in the previous step. This can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method produces a code challenge from the supplied code verifier using SHA-256 as the challenge method and Base64 as encoding if the system supports it (all Android devices should ideally support SHA-256 and Base64), but in rare case if the device doesn’t, then this method would return null meaning that you can’t proceed further. Please ensure to have a null safe check for such cases. [PreviousInitialisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/initialisation) [NextInvocationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/invocation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy codeVerifier = CodeVerifierUtil.generateRandomCodeVerifier() Copy val codeChallenge = CodeVerifierUtil.getCodeChallenge(codeVerifier) codeChallenge?.let { TcSdk.getInstance().setCodeChallenge(it) } ?: print(“Code challenge is Null. Can’t proceed further”) sun-brightdesktopmoon --- # Implementing user flow for your App | Truecaller for Developers Truecaller SDK is a mobile number verification service, without the need for any OTP whatsoever. The right way to implement Truecaller SDK in your mobile app, is to invoke mobile number verification via Truecaller at touch points, where you have your users to sign-up/ login/ checkout by verifying their mobile numbers. Let us now see an example to understand how to effectively use Truecaller SDK at such touch points in your user journey When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number based identity verification of users. Here is such an example from CentroStore - our very own in-house sample app: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F1KVL1MIKWHHX76KTm30E%252F1.jpeg%3Falt%3Dmedia%26token%3Dd95c55e4-d43c-45e6-b3d9-1621fbed65f2&width=768&dpr=3&quality=100&sign=d39e6080&sv=2) ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fo7WXd2Zi2FfkHZZ15exp%252F2.jpeg%3Falt%3Dmedia%26token%3D90743df1-23e5-41d5-9700-44b4886b3613&width=768&dpr=3&quality=100&sign=59893bf1&sv=2) **Building for Various Touch points** _a. Invoking user signup/ login/ verification via Truecaller at app onboarding_ Example: CentroStore - our very own in-house sample app When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number-based identity verification of users. Here is such an example from CetroStore. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FWe9hMyqshD98OVRG7Uiz%252F3.jpeg%3Falt%3Dmedia%26token%3D2b1a8f01-5824-4ad3-b21d-9bb67c053648&width=768&dpr=3&quality=100&sign=d9ca2645&sv=2) _b. Directly invoking verification via Truecaller_ Example : CentroStore - our very own in-house sample app CentroStore has mobile number as the primary identifier for its users. So as soon as users lands on their mobile number login/ signup screen, it invokes Verification via Truecaller, and onboards it’s users within seconds in just 1-tap. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FEjoGonnuIM8soJqIE9uO%252F4.jpeg%3Falt%3Dmedia%26token%3Dd3da39c9-5239-4717-b58a-f4ced1201d01&width=768&dpr=3&quality=100&sign=fb6369d1&sv=2) _c. Performing user verification at checkout_ Example : CentroStore - our very own in-house sample app CentroStore also allows users to browse through it’s app and check for bus ETAs, without needing to sign-up or log-in. However, when users wish to purchase the ticket or travel pass, it requires users to verify their mobile number. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FqKIRQInvtNrAZ368r1cO%252F5.jpeg%3Falt%3Dmedia%26token%3Da08557eb-9277-4441-bda8-17c24215834e&width=768&dpr=3&quality=100&sign=2a93dfef&sv=2) Now that we have gone through and understood how to implement Verification via Truecaller, let’s get started with the SDK integration. [PreviousOAuth SDK 3.0.0chevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0) [NextScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Clearing SDK Instance | Truecaller for Developers In order to clear the resources taken up by the SDK, you may use the following method `TcSdk.clear()` Ideally, you should call this method when the component in which you initialized the SDK is getting killed/destroyed. For instance, if you have initialized the SDK in the onCreate() method of the activity lifecycle, then you need to call clear it in the onDestroy() method of the activity lifecycle. [PreviousCustomisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/customisation) [NextHandling Error Scenarioschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/handling-error-scenarios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for existing Truecaller users **Truecaller app present and registration completed on Truecaller app** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should see the Truecaller profile dialog. Click on continue to complete the verification flow and ensure that the verification is completed. **Truecaller app present but registration not completed on Truecaller app** Ensure that the Truecaller app is present on your device but you have _not_ completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog, and you would receive the control in onFailureProfileShared() with the specific error code. **Truecaller app not present on the device** Remove the Truecaller app from your device. Open your app and try to initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog and should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. **Network not available on device** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Turn off the mobile data and WiFi on your device. Open your app and initiate the Truecaller verification flow. You would see the Truecaller profile dialog. Click on continue button on the dialog, you would receive control in onFailureProfileShared() method with a specific error code. **Client ID should be working fine ( onFailure() Error Type 12)** For complete details on this part, please refer [here](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) . **User wishes to proceed with another number OR does not want to share their Truecaller profile** Initiate the Truecaller verification flow in your app to invoke the Truecaller profile dialog. Click on _system back_ or _Use another mobile number_ button on the dialog to dismiss the dialog. In such a scenario, user should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. We also recommend that you go through the [FAQ section](https://docs.truecaller.com/truecaller-sdk/faqs/general) to go through some of the commonly asked questions. [arrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousNon-Truecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) [NextTest Setupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow/test-setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Setup | Truecaller for Developers 1. Ensure that your Minimum SDK version is at least API level 24 or above. In case your android project compiles for API level below 24, you can include the following line in your AndroidManifest.xml file to avoid any compilation issues : `` Using this would ensure that the SDK works normally for API level 24 & above, and would be disabled for API level < 24. Note: Please make sure that you put the necessary API level checks before accessing the SDK methods in case of compiling for API level < 24 2. **2.1)** Add the Truecaller SDK which contains OAuth functionality to your **app-level build.gradle** file `dependencies {` `...` `implementation "com.truecaller.android.sdk:truecaller-sdk:3.1.0"` `}` **2.2)** Also, add the following lines of code in your gradle file, if not already present `android{` `compileOptions{` `sourceCompatibility JavaVersion.VERSION_1_8` `targetCompatibility JavaVersion.VERSION_1_8` `}` `}` 3. Add mavenCentral() in your project level **build.gradle** file : `allprojects{` `repositories{` `...` `mavenCentral()` `...` `}` Also check your AGP and distribution URL version AGP : 7.4.2 (minimum) distributionUrl=https\\://[services.gradle.org/distributions/gradle-7.5-bin.ziparrow-up-right](http://services.gradle.org/distributions/gradle-7.5-bin.zip) (minimum). 4. **Configure Client ID :** a.) Open your strings.xml file. Example path: /app/src/main/res/values/strings.xml and add a new string with the name "clientID" and value as your "clientID" b.) Open your AndroidManifest.xml and add a meta-data element to the application element `...` `` `...` [PreviousGenerating Client IDchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/generating-client-id) [NextImplementing Callbackschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/implementing-callbacks) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Server Side Validation | Truecaller for Developers Once the SDK shares the _accessToken_ for any user verified via drop call based verification flow, you can verify the authenticity of the access token by making API call from your server to Truecaller's server. The following endpoint will return phone number and country code for the given access token. **API Endpoint:** Copy "https://sdk-otp-verification-noneu.truecaller.com/v1/otp/client/installation/phoneNumberDetail/{accessToken}" **REQUEST :** **Method :** GET **Header Parameters:** **Parameter Name** **Required** **Description** **Example** clientId yes Client ID zHTqS70ca9d3e016946f19a65b01dRR5e56460 **Request Path Parameters:** **Parameter Name** **Required** **Description** **Example** accessToken yes token granted for the partner for the respective user number that initiated login "71d8367e-39f7-4de5-a3a3-2066431b9ca8" **RESPONSE:** * 200 OK - _If access token is valid_ Copy { "phoneNumber":919999XXXXX9 "countryCode":"IN" } * 404 Not Found - _If your credentials are not valid_ Copy { "code":404 "message":"Invalid partner credentials." } * 404 Not Found - _If access token is invalid_ * 500 Internal Error - _for any other internal error_ [PreviousTrueExceptionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification/trueexception) [NextInstrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/instrumentation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy { "code":1404 "message":"Invalid access token." } Copy { "code":500 "message":"error message" } sun-brightdesktopmoon --- # Test Setup | Truecaller for Developers Quick guide on getting your test setup ready to test the common verification scenarios as described in previous sections **Pre-Requisites** * We suggest you to keep handy at-least 2 android smartphones with active SIM connections. Ensure that both the smartphones have your test app installed (Integrated with Truecaller SDK) * 2 different smartphones are required so that in case you get verified on one of the smartphones, you can use the second smartphone to check for the fresh verification scenarios. **Steps to follow for testing user scenarios :** **User State** **App Scenario** **Steps** Existing Truecaller user * Install Truecaller on smartphone 'A' * Complete profile creation step on Truecaller app * Launch your application and initiate the Truecaller verification flow * Truecaller profile consent screen should appear * Tapping on Continue button should verify the user Non Truecaller User User _getting verified for the first time_ on smartphone * Take smartphone 'A' * Uninstall Truecaller app from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs & phone permissions are asked ( if not already granted ) * Allow the permissions to enable receiving a drop call * User is manually asked to enter name ( if it's a new user on your app ) * On entering the name, SDK verifies the user Non Truecaller User User _already verified_ on the smartphone and tried to re-verify _( Please ensure that you try this step only after you have performed the above step )_ * Take smartphone 'A' * Launch your application and logout from the app * Initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone Non Truecaller User User _already verified_ on the smartphone, uninstalls and re-installs the application on the device _( Please ensure that you try this step only after you have performed the 2nd step )_ * Take smartphone 'A' * Uninstall your application from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone circle-info _Wi-Fi or mobile internet should also be enabled on both the smartphones_ [PreviousTruecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [NextGoogle play store app permission declaration formchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/getting-release-ready/google-play-store-app-permission-declaration-form) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Handling Error Scenarios | Truecaller for Developers **Failure/ Error responses** The "onFailure" callback method that you just implemented in the previous step helps you to handle all the possible failure cases when the user couldn't be verified successfully via the Truecaller flow. Below are some of the possible failure scenarios and the corresponding error response that you receive for each of the cases : Error Description Error Code "Something went wrong" 0 "Device is not supported" 16 "Truecaller user has an invalid account state" 10 "Invalid partner or partner information is missing" 12 "Conflicting request code possible in onActivityResult()" 6 "Truecaller app closed unexpectedly" 7 "Truecaller app is not installed/loggedin" 5 "User denied by pressing the footer button" 11 "User denied by dismissing consent screen" 14 "User denied while loading" 2 "Truecaller sdk is old and not compatible" 6 Please note that when you encounter any of the error scenarios and get the control in the "onFailure()" method, you should redirect the user to your alternate verification flow. **Exceptions** In case you face any of the following run time exceptions, please follow the recommended steps as mentioned below : _"No compatible client available. Please change your scope"_ As the exception suggests, you are trying to call an SDK method even though no client is available to handle it. This usually happens if you have initialized the SDK using ONLY\_TC\_USERS scope option i.e to verify only the Truecaller users, and you are not calling isOAuthFlowUsable() method before calling an SDK method. To resolve this, call isOAuthFlowUsable() before calling any SDK method if you are using VERIFY\_TC\_USERS scope option. _"Please call init() on TruecallerSDK first"_ This exception suggests that you are trying to call an SDK method before the SDK has been initialised. To resolve it, check for all possible user flows in your app which could lead to calling an SDK method directly before it has been initialised. _"Add client id in your manifest"_ This exception suggests that you are trying to call SDK initialization/build method without having your clientID mentioned in your manifest as meta-data. _"OAuth scopes cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth scopes. _"OAuth state cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth state. _“Code challenge cannot be null or empty”_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the Code challenge. [PreviousClearing SDK Instancechevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/clearing-sdk-instance) [NextIntegrating with your Backendchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/integrating-with-your-backend) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Completing Verification | Truecaller for Developers 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 ). Copy 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 : Copy //In case of Verification Callback TYPE_MISSED_CALL_RECEIVED TcSdk.getInstance().verifyMissedCall(profile, verificationCallback) Copy //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 [\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) [PreviousNon Truecaller User Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification) [NextTrueExceptionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification/trueexception) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Profile | Truecaller for Developers Make a network call to fetch the userInfo using access token from step 14. The response would be corresponding to the scopes granted by the user. `GET` `https://oauth-account-noneu.truecaller.com/v1/userinfo` **Headers** Name Type Description Authorization\* "Bearer " Insert access token from the previous step - fetching user token 200: OK { “sub”: “13627101294235520", “given\_name”: “xyz”, “family\_name”: “xyz”, “phone\_number”: “91xxxxxxxxxx", “email”: “[\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) ”, “picture”: “https://www.truecaller.com/xyz”, “gender”: “male/female”, “phone\_number\_country\_code”: “IN”, “phone\_number\_verified”: true, ˇ“address”: { “locality”: “Bangalore”, “postal\_code”: “5xxxxx" } } 401: Unauthorized If authentication type is not bearer token 404: Not Found Profile information is not present for the user 500: Internal Server Error Failed to validate token due to server error 401: Unauthorized Token in invalid/ expired 422: Unprocessable Entity openid scope missing in initial request 500: Internal Server Error Unexpected error at server side **Sample cURL request :** Copy curl --location --request GET 'https://oauth-account-noneu.truecaller.com/v1/userinfo' \ --header 'Authorization: Bearer testtoken' [PreviousFetching User Tokenchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/integrating-with-your-backend/fetching-user-token) [NextNon Truecaller User Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Invocation | Truecaller for Developers 1. You can trigger the Truecaller profile verification dialog anywhere in your app flow by calling the following method Copy TcSdk.getInstance().getAuthorizationCode(this); In case isOAuthFlowUsable() method returns false, implying that Truecaller app is not present on the device, you can take the user to your app screen and continue with the verification flow for non-Truecaller users. [PreviousSetting up OAuth parameterschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/setting-up-oauth-parameters) [NextCustomisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/customisation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Token | Truecaller for Developers Using the “state” from step 10, “code verifier” from step 12, and the “authorization code” from step 9, you need to make a network call to Truecaller’s backend so as to fetch the access token : `POST` `https://oauth-account-noneu.truecaller.com/v1/token` **Headers** Name Type Description Content-Type\* application/x-www-form-urlencoded String **Request Body** Name Type Description grant\_type "authorization\_code" // hardcoded value String client\_id code Authorisation code from TcOAuthData callback from step 9 code\_verifier From step 12 200: OK Success { "access\_token": "some-access-token", "expires\_in": 3600, "token\_type": "Bearer" } 400: Bad Request - If grant type is not supported 403: Forbidden - If client id is invalid 500: Internal Server Error - Unexpected error on the server side 400: Bad Request - Some of the parameters are empty in the request 403: Forbidden Valid grant type but not allowed for the client 403: Forbidden Invalid auth code provided 403: Forbidden Invalid/expired auth code in provided 403: Forbidden Invalid/expired code verifier is provided 429: Too Many Requests If the number of requests exceeds the allowed limit 503: Service Unavailable Resource unavailable due to server-side issue **Sample cURL request :** Copy curl --location --request POST 'https://oauth-account-noneu.truecaller.com/v1/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=<>' \ --data-urlencode 'code=<>' \ --data-urlencode 'code_verifier=<>' [PreviousIntegrating with your Backendchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/integrating-with-your-backend) [NextFetching User Profilechevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/integrating-with-your-backend/fetching-user-profile) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating Client ID | Truecaller for Developers To ensure the authenticity of interactions between your app and Truecaller, you need to generate a client ID from the Truecaller developer portal by following the steps below: * Go to [https://sdk-console-noneu.truecaller.com/loginarrow-up-right](https://sdk-console-noneu.truecaller.com/login) and register your account. * Once registered, log in to your account and click on the "create project” button. * Enter the project name and select the business category from the dropdown menu. This will create a new project. * On the project screen, click the “add credential” button and select the platform as Android from the dropdown menu. * On the credential section, enter the package name and the SHA1. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FNSNf4oRlLaQVErDSH90S%252FA.png%3Falt%3Dmedia%26token%3D2c794ccc-b34c-41a8-a994-8dda65fef417&width=768&dpr=3&quality=100&sign=b935eaeb&sv=2) * Your package name corresponds to the applicationId in your app level `build.gradle` file. You can get to know the SHA1 for your different app builds by following these steps : * Open your project in android studio * Open terminal * Type command `./gradlew signingReport` Once done you should be able to see the SHA1 fingerprint of your different build configurations \[ debug /release \] in the terminal window within the android studio. Once you input your app details and create the app, you will be able to see a unique "ClientID" for your app which you need to include in your project to authorise all verification requests. [PreviousIntegration Stepschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps) [NextSetupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Clearing SDK Instance | Truecaller for Developers In order to clear the resources taken up by the SDK, you may use the following method `TcSdk.clear()` Ideally, you should call this method when the component in which you initialized the SDK is getting killed/destroyed. For instance, if you have initialized the SDK in the onCreate() method of the activity lifecycle, then you need to call clear it in the onDestroy() method of the activity lifecycle. [PreviousCustomisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/customisation) [NextHandling Error Scenarioschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/handling-error-scenarios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integration Steps | Truecaller for Developers circle-info In order to proceed with the integration, please refer to [the previous sectionsarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/implementing-user-flow-for-your-app) so as to understand various user flows and touch points in the user journey where Truecaller can be enabled. * Register on the [OAuth portalarrow-up-right](https://sdk-console-noneu.truecaller.com/) to create your business account and manage OAuth projects. * Once you have created your account, create your OAuth project & generate credentials by following the steps [here.](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) * Once you have generated the credentials, you can easily, in a few simple steps integrate the Truecaller SDK by referring to our step-by-step guide in the subsequent sections. * Post integration completion, submit your project for review and go live. [PreviousScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [NextGenerating Client IDchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing Callbacks | Truecaller for Developers 1. In your Activity/Fragment where you want to integrate the Truecaller OAuth flow, either make the component implement the interface TcOAuthCallback or create an instance of it which you would require to initialize TcSdkOptions in the next step. The interface has 2 functions which need to be overridden - Copy private val tcOAuthCallback: TcOAuthCallback = object : TcOAuthCallback { override fun onSuccess(tcOAuthData: TcOAuthData) { .. } override fun onFailure(tcOAuthError: TcOAuthError) { .. } } * _onFailure()_ method will be called in case of an error. You would get the error details like the error code and error message through tcOAuthError returned with this method. * _onSuccess()_ method will be called when the user gives consent to authorize your app by tapping on the primary button on the Truecaller’s consent screen, and subsequently, an authorization code will be successfully generated and received. This method would return tcOAuthData which contains information like : * authorizationCode - which you can utilize to fetch the user’s access token * scopesGranted - list of scopes granted by the user * state - state parameter returned by the authorisation server. If the state set by your application is the same as the state returned by the authorisation server, it’s safe to proceed further. If state parameters are different, someone else has initiated the request and it could be a case of request forgery. 1. Override the onActivityResult() method of the component used in step 1 and call the onActivityResultObtained() method if the requestCode matches to TcSdk.SHARE\_PROFILE\_REQUEST\_CODE. Copy override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (requestCode == TcSdk.SHARE_PROFILE_REQUEST_CODE) { TcSdk.getInstance().onActivityResultObtained(this, requestCode, resultCode, data) } } [PreviousSetupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/setup) [NextInitialisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/initialisation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non Truecaller User Verification | Truecaller for Developers This section defines the steps that can be used to trigger verification of non Truecaller app users which will be powered via Truecaller's drop call based verification flow In order to verify both the Truecaller users (via OAuth Flow) and the non-Truecaller users (via manual verification), follow these steps : 1. Enable the Non Truecaller user verification capability for your app, by going to your project on the Truecaller developer portal and navigating to the bottom section. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Frf1k3nzGI2Z1lhpu0ZSj%252FC.png%3Falt%3Dmedia%26token%3D8aa2cc06-2e25-40a0-9aa7-29cd79590670&width=768&dpr=3&quality=100&sign=5d9a4d47&sv=2) 1. Configure sdkOptions in the TcSdkOptions Builder and supply a value of **TcSdkOptions.OPTION\_VERIFY\_ALL\_USERS** to it like below. 1. Configure permissions required by the SDK : 1. Once you receive a callback in the `TcOAuthCallback#onVerificationRequired()`, you can initiate the verification for the user by calling the following method: Here - * the first parameter is the country code of the mobile number for which the verification needs to be triggered * the second parameter (PHONE\_NUMBER\_STRING) is the mobile number to be verified. Please ensure proper validations are in place so as to send correct phone number string to the above method, otherwise an exception would be thrown * the third parameter is an instance of VerificationCallback as defined [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ​ * the fourth parameter is an instance of FragmentActivity Please note that Truecaller OAuth SDK v3.0.0 currently supports the verification for non-Truecaller users for Indian numbers only 1. Once you initiate the verification via `TcSdk.getInstance().requestVerification()` method, you will receive either a callback in your `VerificationCallback` instance with a specific `requestType` as described below **onRequestSuccess()** method is called under any of the following scenarios - * When the OTP via Truecaller IM is successfully initiated for the input mobile number. In this case, you will get the callbackType as `VerificationCallback.TYPE_IM_OTP_INITIATED` * When the OTP via Truecaller IM is successfully detected on that device by the SDK present in your app. In this case, you will get the callbackType as `VerificationCallback.TYPE_IM_OTP_RECEIVED` * When drop call is successfully initiated for the input mobile number. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_INITIATED` * When drop call is successfully detected on that device by the SDK present in your app. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_RECEIVED` * When the verification is successful for a particular number. In this case, you will get the callbackType as `VerificationCallback.TYPE_VERIFICATION_COMPLETE` * When the user is already verified on that particular device before. In this case, you will get the callbackType as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE` When **callbackType** is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`, you will receive an additional parameter for the time to live i.e TTL (in seconds) which is passed as String extra in the `VerificationDataBundle` of `onRequestSuccess()`. This value determines amount of time left to complete the verification. You can use this value to show a waiting message to your user before they can try for another attempt. Once the TTL expires, you can either auto-retry the verification by calling the requestVerification() method automatically with the same input parameters OR you can also take the user back to the number input screen to enter a different number for verification. When the **callbackType** is `VerificationCallback.TYPE_ALREADY_VERIFIED_BEFORE` or `VerificationCallback.TYPE_VERIFICATION_COMPLETE`, it means that the user verification via Truecaller SDK is complete. In these cases, the SDK will share an additional access token with your application, which you may then use to validate the response at your server end. To fetch the access token, you may use the following code snippet : Post fetching the access token, you may perform the server side validation by referring to the steps mentioned in the later part of the documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/server-side-validation) onRequestFailure() method will be called when some error has occurred while verifying the provided mobile number. You will receive the appropriate error message from TrueException using TrueException#getExceptionMessage().For details of different possible error types you may encounter, please refer to the [TrueExceptionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/trueexception) [PreviousFetching User Profilechevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/integrating-with-your-backend/fetching-user-profile) [NextCompleting Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/non-truecaller-user-verification/completing-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ALL_USERS) . // other customizations (if any) .build() Copy For Android 8 and above : ​ ​ ​ For Android 7 and below : ​ Copy try{ TcSdk.getInstance().requestVerification("IN", , verificationCallback, context); }catch (RuntimeException e){ Log.i(TAG, e.getMessage()); } Copy override fun onRequestSuccess(callbackType: Int,verificationDataBundle : VerificationDataBundle?) { when(callbackType){ VerificationCallback.TYPE_MISSED_CALL_INITIATED)-> { //missed-call initiated if(verificationDataBundle != null){ verificationDataBundle.getString(VerificationDataBundle.KEY_TTL); verificationDataBundle.getString(VerificationDataBundle.KEY_REQUEST_NONCE); } } VerificationCallback.TYPE_MISSED_CALL_RECEIVED)-> { //missed-call received } //OTP initiated via Truecaller IM VerificationCallback.TYPE_IM_OTP_INITIATED) -> { if(verificationDataBundle != null) { val ttl = verificationDataBundle.getString(VerificationDataBundle.KEY_TTL); val requestNonce = verificationDataBundle.getString(VerificationDataBundle.KEY_REQUEST_NONCE); } } //OTP auto-read via Truecaller IM which you can pre-fill in the OTP view VerificationCallback.TYPE_IM_OTP_RECEIVED) -> { val otp = bundle.getString(VerificationDataBundle.KEY_OTP) } VerificationCallback.TYPE_VERIFICATION_COMPLETE)-> { //verification complete } VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE)-> { //user already verified } } } override fun onRequestFailure(callbackType: Int, trueException : TrueException) { //Exception } }; Copy //For when the control goes to TYPE_ALREADY_VERIFIED_BEFORE verificationDataBundle.getProfile().accessToken //For when the control goes to TYPE_VERIFICATION_COMPLETE verificationDataBundle.getString(VerificationDataBundle.KEY_ACCESS_TOKEN) sun-brightdesktopmoon --- # Initialisation | Truecaller for Developers 1. Create a TcSdkOptions object by using the tcOAuthCallback from the previous step and provide the context. Supply the appropriate customization settings to the relevant methods of TcSdkOptions and use the instance of tcSdkOptions to initialize the TcSdk in the next step. Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .buttonColor(Color.parseColor("<>")) .buttonTextColor(Color.parseColor("<>")) .loginTextPrefix(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .ctaText(TcSdkOptions.CTA_TEXT_CONTINUE) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_SKIP) .consentTitleOption(TcSdkOptions.SDK_CONSENT_TITLE_LOG_IN) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .build(); In case you do not wish to provide any customization settings and fall back to the default SDK settings, you may simply call - Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback).build() 1. Initialize TcSdk using the tcSdkOptions from the previous step : Copy TcSdk.init(tcSdkOptions) Note: Truecaller OAuth SDK needs to be initialized only once in the component and the same instance can be accessed without the need to initialize it again, via **TcSdk.getInstance()** Ideally, you should call the init() method when the component is getting created/initialized to avoid calling it multiple times. 1. Once the SDK is initialized, check whether the OAuth functionality is usable or not by calling : Copy val isUsable = TcSdk.getInstance().isOAuthFlowUsable If _isUsable_ is True, you can proceed with further steps, otherwise, you’d have to fall back to some other mechanism ( your fallback verification flow ). Calling other SDK methods when isUsable is False would result in an exception, so please ensure to call this soon after initializing the SDK, and proceed to further steps only if this method returns True. [PreviousImplementing Callbackschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/implementing-callbacks) [NextSetting up OAuth parameterschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/setting-up-oauth-parameters) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Setting up OAuth parameters | Truecaller for Developers 1. Set a unique state parameter & store it in the current session to use it later in the onSuccess() callback method of the TcOAuthCallback to match if the state received from the authorization server is the same as set here to prevent request forgery attacks. Copy stateRequested = BigInteger(130, SecureRandom()).toString(32) TcSdk.getInstance().setOAuthState(stateRequested) One good choice for a state token is a string of around 32 characters constructed using a high-quality random-number generator as we did above. Another approach could be a hash generated by signing some of your session state variables with a key that is kept secret on your back-end. circle-info Truecaller OAuth SDK already verifies the request-response correlation before forwarding it to the your app. 1. Set the list of scopes to be requested. Copy TcSdk.getInstance().setOAuthScopes(arrayOf("profile", "phone", ...)) // Currently available list of scopes : - profile - phone - openid - offline_access - email - address Note : Please include the relevant scopes for your project. Make sure the scopes you’re requesting above are selected on the portal for your project 1. Generate a unique code verifier & store it in the current session since it would be required later to generate the access token. It can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method generates a random code verifier string using SecureRandom as the source of entropy with 64 as the default entropy quantity. 1. Set the corresponding code challenge using the code verifier generated in the previous step. This can be generated using the utility class CodeVerifierUtil provided in the SDK. This utility method produces a code challenge from the supplied code verifier using SHA-256 as the challenge method and Base64 as encoding if the system supports it (all Android devices should ideally support SHA-256 and Base64), but in rare case if the device doesn’t, then this method would return null meaning that you can’t proceed further. Please ensure to have a null safe check for such cases. [PreviousInitialisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/initialisation) [NextInvocationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/invocation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy codeVerifier = CodeVerifierUtil.generateRandomCodeVerifier() Copy val codeChallenge = CodeVerifierUtil.getCodeChallenge(codeVerifier) codeChallenge?.let { TcSdk.getInstance().setCodeChallenge(it) } ?: print(“Code challenge is Null. Can’t proceed further”) sun-brightdesktopmoon --- # Setup | Truecaller for Developers 1. Ensure that your Minimum SDK version is at least API level 24 or above. In case your android project compiles for API level below 24, you can include the following line in your AndroidManifest.xml file to avoid any compilation issues : `` Using this would ensure that the SDK works normally for API level 24 & above, and would be disabled for API level < 24. Note: Please make sure that you put the necessary API level checks before accessing the SDK methods in case of compiling for API level < 24 2. **2.1)** Add the Truecaller SDK which contains OAuth functionality to your **app-level build.gradle** file `dependencies {` `...` `implementation "com.truecaller.android.sdk:truecaller-sdk:3.0.0"` `}` **2.2)** Also, add the following lines of code in your gradle file, if not already present `android{` `compileOptions{` `sourceCompatibility JavaVersion.VERSION_1_8` `targetCompatibility JavaVersion.VERSION_1_8` `}` `}` 3. Add mavenCentral() in your project level **build.gradle** file : `allprojects{` `repositories{` `...` `mavenCentral()` `...` `}` Also check your AGP and distribution URL version AGP : 7.4.2 (minimum) distributionUrl=https\\://[services.gradle.org/distributions/gradle-7.5-bin.ziparrow-up-right](http://services.gradle.org/distributions/gradle-7.5-bin.zip) (minimum). 4. **Configure Client ID :** a.) Open your strings.xml file. Example path: /app/src/main/res/values/strings.xml and add a new string with the name "clientID" and value as your "clientID" b.) Open your AndroidManifest.xml and add a meta-data element to the application element `...` `` `...` [PreviousGenerating Client IDchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) [NextImplementing Callbackschevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/implementing-callbacks) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Product Updates | Truecaller for Developers Get to know all about the updates we keep doing for Truecaller SDK! [PreviousNumber Verification Pluginchevron-left](https://docs.truecaller.com/truecaller-sdk/faqs/number-verification-plugin) [NextApp Review Processchevron-right](https://docs.truecaller.com/truecaller-sdk/product-updates/app-review-process) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # App Review Process | Truecaller for Developers To ensure that your users get the best onboarding experience, and at the same time help you realise the true potential of Truecaller SDK, we are now coming up with a developer app review process. You can now share your apps/ mobile sites integrated with Truecaller SDK with the Truecaller developer platform team to get feedback, and recommendations on best practices before you actually make your app/ website live for your users. Our team comes with years of experience on design, UX and learnings on minimising user drop offs. You can submit your apps/ website for review at any point once you have successfully integrated Truecaller SDK, but we recommend that you proceed with the submission only after you have thoroughly tested your app in development mode. To submit the application for review, please raise a ticket by going to our support section [**here**arrow-up-right](https://developer.truecaller.com/contact) , and navigate to the “App Review” section. Submit your details along with a link to your app file/ website link in the message body. Once you have submitted your app/ mobile site for review, our team will get back to you within 3-5 working days. _P.S. : Apps and mobile websites with best implementations of the verification flow after being submitted for the app review process and quality certified from our end, stand a chance to be showcased in our monthly developer newsletter and case studies in our global developer portal._ [PreviousProduct Updateschevron-left](https://docs.truecaller.com/truecaller-sdk/product-updates) [NextIntroducing dark themechevron-right](https://docs.truecaller.com/truecaller-sdk/product-updates/introducing-dark-theme) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Number Verification Plugin | Truecaller for Developers **What is the “Truecaller Number Verification ” app ?** This app helps you verify your user’s mobile number identity anywhere during the checkout flow and also lets you capture mapped user profile details such as name, email, city etc. which can be auto-filled in your form to make the process simpler for your users and reduce checkout time. **Does the user need to do any manual efforts or share any information to go through the number verification flow ?** Truecaller verification flow is a totally effortless and no-OTP flow. The users don’t even need to type in their mobile number or wait for an OTP. The users simply need to give their consent to share their basic Truecaller profile details like verified mobile number, name, city etc. **Is there any technical integration or coding required to set up the app with my Shopify store ?** No, there is no need for any technical integration. You simply need to install the app and configure a few options to get started. The entire setup can be done within a matter of a few minutes. **What are the supported platforms for this app ?** This app is currently supported on Mobile websites on Android platform only **How can I know the details about all the configuration options available in the app ?** To know what each of the configuration option means, and what are the possible value options, please refer to this section of our documentation : https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/initialisation **What happens if I change my store theme ?** When you change theme, you need to follow steps in **Installation** tab again, to install/customise the flow on product and/or checkout flows. **What is the pricing for this app ?** This app is completely free to use and has no commercials and verifications limits involved. You can verify any number of users on your website for free. **Can I use the number verification flow on "Product Page" ?** Yes, the app works with "Buy it Now" button on the "Product Page". To enable this, you need to disable the "Dynamic Checkout Button" from theme settings. [PreviousMobile Web SDKchevron-left](https://docs.truecaller.com/truecaller-sdk/faqs/mobile-web-sdk) [NextProduct Updateschevron-right](https://docs.truecaller.com/truecaller-sdk/product-updates) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating App Key | Truecaller for Developers You’ll be required to generate a “partner key” from the Truecaller developer console to make the Truecaller Number Verification app work with your Shopify store. You can do so very easily and for free by registering [herearrow-up-right](https://developer.truecaller.com/sign-up) ( in case you don’t already have an existing account ). ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FgjzgQ7haNPw9hcpiGAnJ%252F1.png%3Falt%3Dmedia%26token%3Db9f54c88-9f5f-433f-ac0d-9f5b17b4cb1f&width=768&dpr=3&quality=100&sign=cae51651&sv=2) 1. Once you have created you account and log in, click on “Add Application” and select the “Shopify” radio button. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fsn6qAzZUYZmMo6TuBvGy%252F2.png%3Falt%3Dmedia%26token%3D71a9aa3b-c5be-4529-815b-c5d07613d782&width=768&dpr=3&quality=100&sign=14f17035&sv=2) 1. Input your Store name (e.g. examplestore.myshopify.com) and Shopify Store id to generate the partner key. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FuCL5aTZJBqVPNyNP9glT%252F3.png%3Falt%3Dmedia%26token%3Da653a485-1eec-4e75-bc2c-228515618d47&width=768&dpr=3&quality=100&sign=348c55b0&sv=2) 3) Click continue, and copy your newly generated partner key from the Truecaller console. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FsfOqGpVlXeMrCt35omIQ%252F4.png%3Falt%3Dmedia%26token%3Db695909d-df1b-4039-9a96-6f7b8d74dfa8&width=768&dpr=3&quality=100&sign=6ad5a04&sv=2) [PreviousShopify Appchevron-left](https://docs.truecaller.com/truecaller-sdk/shopify-app) [NextApp Configurationchevron-right](https://docs.truecaller.com/truecaller-sdk/shopify-app/app-configuration) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Instrumentation | Truecaller for Developers Quick guide on how to properly track and instrument funnel for the verification flow of users via Truecaller on your mobile website For proper tracking of the verification funnel via Truecaller on your app, you should implement tracking events for the following states : 1. Total users coming to your verification flow. 2. Number of cases when the Truecaller app is present on your device - can be appropriately known using the javascript condition as described in the [invoking verificationarrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/invoking-verification) section. 3. Number of users who proceed with this flow and click Continue on the Truecaller dialog \[ for these cases, you receive a success response with user's access token on the callback URL configured by you \]. For details, refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/fetch-user-profile) . 4. Number of cases where you received any error, where you receive an error response with 'user\_rejected' message on the callback URL configured by you. For details, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/handling-error-scenarios) . 5. Number of successful profiles fetched by your backend post receiving the access token from Truecaller's backend on your callback URL. For details, refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/fetch-user-profile) . 6. Number of successful communications between your backend and frontend post fetching the user's profile information to complete the verification flow. [PreviousGetting Release Readychevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready) [NextTesting your verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/testing-your-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Release Ready | Truecaller for Developers [Testing your verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow) [Google play store app permission declaration form](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/google-play-store-app-permission-declaration-form) [Moving to Production](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/moving-to-production) [PreviousInstrumentationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/instrumentation) [NextTesting your verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Customisation | Truecaller for Developers Truecaller SDK provides you with capabilities to configure the following: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FlaFG2xmhOyuNRXaxPju6%252FB.jpeg%3Falt%3Dmedia%26token%3Dab5338c8-42be-4478-baf3-31941a0aa7db&width=768&dpr=3&quality=100&sign=824c25dc&sv=2) Refer to the below section for details on all the customization capabilities and the possible values you may set: Copy TcSdkOptions.Builder(this, tcOAuthCallback) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_ANOTHER_MOBILE_NO) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .ctaText(TcSdkOptions.CTA_TEXT_ACCEPT) .heading(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .buttonColor(1111) .buttonTextColor(1111) .build() **Contextual header \[ .heading() \]** To provide the appropriate context of verification to the Truecaller user, use one of the below mentioned TruecallerSdkScope values to show the corresponding message to the user Log in to TcSdkOptions.SDK\_CONSENT\_HEADING\_LOG\_IN\_TO Sign up with TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGNUP\_WITH Sign in to TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGN\_IN\_TO Verify number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_NUMBER\_WITH Register with TcSdkOptions.SDK\_CONSENT\_HEADING\_REGISTER\_WITH Get started with TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_STARTED\_WITH Proceed with TcSdkOptions.SDK\_CONSENT\_HEADING\_PROCEED\_WITH Verify with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_WITH Verify profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PROFILE\_WITH Verify your profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_PROFILE\_WITH Verify your phone number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PHONE\_NO\_WITH Verify your number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_NO\_WITH Continue with TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_WITH Complete order with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_ORDER\_WITH Place order with TcSdkOptions.SDK\_CONSENT\_HEADING\_PLACE\_ORDER\_WITH Complete booking with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_BOOKING\_WITH Checkout with TcSdkOptions.SDK\_CONSENT\_HEADING\_CHECKOUT\_WITH Manage Details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_DETAILS\_WITH Manage your details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_YOUR\_DETAILS\_WITH Login to <> with one tap TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_TO\_WITH\_ONE\_TAP Subscribe to TcSdkOptions.SDK\_CONSENT\_HEADING\_SUBSCRIBE\_TO Get updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_UPDATES\_FROM Continue reading on TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_READING\_ON Get new updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_NEW\_UPDATES\_FROM Log in/ Signup with TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_SIGNUP\_WITH **Button text options \[ .ctaTextPrefix() \]** To set the prefix on the CTA button Continue TcSdkOptions.CTA\_TEXT\_CONTINUE Proceed TcSdkOptions.CTA\_TEXT\_PROCEED Accept TcSdkOptions.CTA\_TEXT\_ACCEPT Confirm TcSdkOptions.CTA\_TEXT\_COFIRM **Button shape \[ .buttonShapeOptions() \]** To chose the shape of the CTA button Round TcSdkOptions.BUTTON\_SHAPE\_ROUNDED Rectangle TcSdkOptions.BUTTON\_SHAPE\_RECTANGLE **Footer CTA text \[ .footerType() \]** To configure the text of the additional footer CTA present at the bottom Use another number TcSdkOptions.FOOTER\_TYPE\_CONTINUE Use another method TcSdkOptions.FOOTER\_TYPE\_ANOTHER\_METHOD Enter details manually TcSdkOptions.FOOTER\_TYPE\_MANUALLY Later TcSdkOptions.FOOTER\_TYPE\_LATER **Privacy policy :** To add your privacy policy link on the verification screen, you can configure the respective hyperlink from your developer account **Terms of service:** To add your terms of service link on the verification screen, you can configure the respective hyperlink from your developer account **Language** You can optionally customize the consent screen in any of the supported languages. To do so, add the following line : Copy Currently supported languages: english en hindi hi marathi mr telugu te malayalam ml urdu ur punjabi pa tamil ta bengali bn kannada kn swahili sw arabic ar [PreviousInvocationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/invocation) [NextClearing SDK Instancechevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/clearing-sdk-instance) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val locale = Locale("hi") // change language to Hindi TcSdk.getInstance().setLocale(locale) sun-brightdesktopmoon --- # Deactivating App Block | Truecaller for Developers This step is only needed when you are required to deactivate the app block from your shopify web store **To deactivate from the product page** Click on the "Verify and Buy ( Product )" app from the product information section on your product page ![](https://docs.truecaller.com/~gitbook/image?url=https%3A%2F%2F926286278-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-L_r_7LQgMQPpvEeFmRw-2395863198%252Fuploads%252FDrDe1g1hVX1RYbDbGfpW%252FScreenshot%25202022-02-23%2520at%252012.48.35%2520AM.png%3Falt%3Dmedia%26token%3Dfac1e139-d1cd-4f81-b302-eb266ad28219&width=300&dpr=4&quality=100&sign=adfae8e2b3f60eb0ba02e75cb5d2b5e4b3a5c9da4c267ec7c2810d35be727ab0) Click on "Remove Block" at the bottom part of the left hand navigation panel ![](https://docs.truecaller.com/~gitbook/image?url=https%3A%2F%2F926286278-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-L_r_7LQgMQPpvEeFmRw-2395863198%252Fuploads%252Fu8FpGYuHlQ32aqZtDQP4%252FScreenshot%25202022-02-23%2520at%252012.48.14%2520AM.png%3Falt%3Dmedia%26token%3D871f7286-89b8-4e58-a4c6-42700ba9b9b2&width=300&dpr=4&quality=100&sign=5e257b049bd4aa2cac9c2b52e27ff8aa618964505a5c31f73bebd199fe6ac4cb) **To disable from the cart page** Turn off the toggle from the "Cart Page (Truecaller) " app from the left hand side navigation panel ![](https://docs.truecaller.com/~gitbook/image?url=https%3A%2F%2F926286278-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-L_r_7LQgMQPpvEeFmRw-2395863198%252Fuploads%252Fdzb1zTOYuX3qLgHU2cVL%252FScreenshot%25202022-02-23%2520at%252012.47.52%2520AM.png%3Falt%3Dmedia%26token%3D261ae7e4-d915-4e42-908b-808a270ea9eb&width=300&dpr=4&quality=100&sign=a043a1ab14666ad890ee01ee00ab3a9d83fab5000965b494bdb7dda67c973af4) [PreviousApp Configurationchevron-left](https://docs.truecaller.com/truecaller-sdk/shopify-app/app-configuration) [NextFAQSchevron-right](https://docs.truecaller.com/truecaller-sdk/faqs) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Shopify App | Truecaller for Developers [Generating App Key](https://docs.truecaller.com/truecaller-sdk/shopify-app/generating-app-key) [App Configuration](https://docs.truecaller.com/truecaller-sdk/shopify-app/app-configuration) [Deactivating App Block](https://docs.truecaller.com/truecaller-sdk/shopify-app/deactivating-app-block) [PreviousServer Side Response Validationchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/server-side-response-validation) [NextGenerating App Keychevron-right](https://docs.truecaller.com/truecaller-sdk/shopify-app/generating-app-key) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Mobile Websites | Truecaller for Developers [Implementing user flow for your Mobile Website](https://docs.truecaller.com/truecaller-sdk/mobile-websites/implementing-user-flow-for-your-mobile-website) [Generating App Key](https://docs.truecaller.com/truecaller-sdk/mobile-websites/generating-app-key) [Integrating with your mobile website](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website) [Getting Release Ready](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready) [PreviousChange Logchevron-left](https://docs.truecaller.com/truecaller-sdk/android/change-log) [NextImplementing user flow for your Mobile Websitechevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/implementing-user-flow-for-your-mobile-website) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Server Side Response Validation | Truecaller for Developers TruecallerSDK provides two optional delegate methods to check the authenticity of the profile you receive. Note that TruecallerSDK readily offers a simplified way to request and receive a user profile via required delegate methods and verifies the content before forwarding it your app. **Server side Truecaller Profile authenticity check** The delegate method didReceiveTrueProfileResponse: will return a TCTrueProfileResponse instance. Inside TCTrueProfileResponse class there are 3 important fields, payload, signature and signatureAlgorithm. Payload is a Base64 encoding of the json object containing all profile info of the user. Signature contains the payload's signature. You can forward these fields along with the signing algorithm back to your backend and verify the authenticity of the information by doing the following: 1. Fetch Truecaller public keys using this api: [https://api4.truecaller.com/v1/keyarrow-up-right](https://api4.truecaller.com/v1/key) (we recommend you cache these keys for future use and refresh the cache only if you cannot verify the signature); 2. Loop through the public keys and try to verify the signature and payload**.** **Request-Response correlation check** Every request created with TruecallerSDK has a unique identifier namely 'requestNonce'. This identifier is bundled into the response for assuring a correlation between a request and a response. If you want you can check this correlation yourself by: 1. Get the request nonce at willRequestProfileWithNonce: method 2. In didReceiveTrueProfileResponse: verify that the previously retrieved identifier matches the one in TCTrueProfileResponse.requestNonce. [PreviousSafari Redirectionchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/handling-error-scenarios/safari-redirection) [NextShopify Appchevron-right](https://docs.truecaller.com/truecaller-sdk/shopify-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # iOS | Truecaller for Developers [Generating App Key](https://docs.truecaller.com/truecaller-sdk/ios/generating-app-key) [Integrating with your iOS App](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app) [Server Side Response Validation](https://docs.truecaller.com/truecaller-sdk/ios/server-side-response-validation) [PreviousTesting your verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/testing-your-verification-flow) [NextGenerating App Keychevron-right](https://docs.truecaller.com/truecaller-sdk/ios/generating-app-key) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating App Key | Truecaller for Developers To ensure the authenticity of interactions between your app and Truecaller, you need to generate an app key \[ partner key \] and app link from Truecaller developer account ( [https://developer.truecaller.com/loginarrow-up-right](https://developer.truecaller.com/login) ) by adding your App Name, Bundle Id and prefix. To generate a new app key for your iOS app, go to the 'MANAGE APPS' section on the developer account dashboard and click on 'CREATE APP'. Select 'iOS' in the App type and continue to enter your app details. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fxjalgmokkv5BhCIoJRV9%252Fj.png%3Falt%3Dmedia%26token%3De804efeb-8113-4437-b731-4d0bf77db805&width=768&dpr=3&quality=100&sign=58c8d6c1&sv=2) You can find your App Id in the "Apple Development Portal". If you do not have App Id yet, then open Project -> Capabilities -> Enable Associated Domains. New app id will be automatically created by Xcode. To find the Prefix, go to the member center on [https://developer.apple.comarrow-up-right](https://developer.apple.com/) and look at "Certificates, Identifiers & Profiles", click "Identifiers", then "App IDs" in the section under "Identifiers". Find your app, click on it, and there you will be able to see the Prefix value ( Refer image below ). ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FN01MZ7vOVQlV5ddyWd0S%252Fk.png%3Falt%3Dmedia%26token%3D64a0df89-7b6a-4782-bb6f-1a59d30e730d&width=768&dpr=3&quality=100&sign=822f94d1&sv=2) Once you input your app details and create the app, you will be able to see the "App Key" and "App Link" values for your app. You need to include these values in your project to authorise all the verification requests. [arrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/testing-your-verification-flow) [PreviousiOSchevron-left](https://docs.truecaller.com/truecaller-sdk/ios) [NextIntegrating with your iOS Appchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Instrumentation | Truecaller for Developers Quick guide on how to properly track and instrument funnel for the verification flow of users via Truecaller on your app For proper tracking of the verification funnel via Truecaller SDK on your app, we recommend you to implement tracking events for the following states : **When you are using the SDK for verification of Truecaller users only:** 1. Total users coming to your verification flow 2. Number of cases when the Truecaller app is present on your smartphone 3. Number of profile verification requests made by your app ( when `TcSdk.getInstance().isOAuthFlowUsable` method is invoked ) 4. Number of users who proceed with this flow and click Continue on the Truecaller dialog \[ for these cases, you receive a success callback with TcOAuthData response in onSuccess() callback method \] 5. Number of cases where you received any error, where you receive an error callback with TcOAuthError response in onFailure() callback method. For details on specific error codes, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/handling-error-scenarios) **When you are using the SDK for verification of non-Truecaller users also ( via drop call):** 1. Total users coming to your verification flow. 2. Number of cases, when the Truecaller app is present on your smartphone and users, get verified via the Truecaller 1-tap flow (as described in the above section) 3. Number of verification requests made by your app for a non-Truecaller user ( when `TruecallerSDK.getInstance().requestVerification()` method is invoked ). 4. Number of cases where the user is getting verified for the very first time on the current smartphone and you receive a success callback - onRequestSuccess() method ( Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ) - a.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`. This implies that a drop call has been triggered to the user's mobile number b.) When the callback type you receive is `VerificationCallback.TYPE_MISSED_CALL_RECEIVED`. This implies that a drop call has been received on the user's mobile number on that smartphone c.) Further to the above step, you complete the user verification by invoking `TcSdk.getInstance().verifyMissedCall(profile, verificationCallback)` When the callback type you receive is either `VerificationCallback.TYPE_VERIFICATION_COMPLETE`. This implies that the verification is complete for the user d.) Number of cases where the user is already verified previously on the current smartphone and gets verified directly. In such cases, you receive the success callback - onRequestSuccess() method with callback type as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE`. [PreviousServer Side Validationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification/server-side-validation) [NextGetting Release Readychevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing user flow for your Mobile Website | Truecaller for Developers While you start integrating Truecaller SDK, as the very first step, it is important to work on designing the right user flow, so that you can achieve desired results. Truecaller SDK is a mobile number verification service, without the need for any OTP whatsoever. The right way to implement Truecaller SDK on your mobile web, is to invoke mobile number verification via Truecaller at touch points, where you have your users to sign-up/ login/ checkout by verifying their mobile numbers. Let us now see an example to understand how to effectively use Truecaller SDK at such touch points in your user journey Users on CarDekho - India’s largest online auto discovery and classifieds platform, can browse for new cars, access details and more on CarDekho mSite. However, when users wish to take a test ride, get more details, request for car loan offers, and more, it requires users to verify their mobile number to ensure valid users are accessing such details. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FElpR9mArqvCjdLOTFRCZ%252FD.avif%3Falt%3Dmedia%26token%3D1c40d2cb-1b45-46d8-820f-0b237420a843&width=768&dpr=3&quality=100&sign=9a55e60c&sv=2) From the above flow, we can see that for Truecaller users, signup is mere 1-step process without needing any OTP; while for non-Truecaller users the signup process is tedious, and involves many steps, and thus more possibilities of drop-offs. **Building for various touch points** **a. User signup/ login via mobile number** Example : Intrcity - India’s first SmartBus for safe inter-city travel In order to complete your ticket booking on Intrcity’s mobile website, users need to verify their number in order to signup/ login into their accounts. Mobile number being an important part of the user profile, Intrcity uses Truecaller to quickly verify mobile number, and auto-fill certain parts of the user profile to reduce user effort and save time. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FjtQ02pcBS6tIsrV1LWna%252Fe.webp%3Falt%3Dmedia%26token%3D7b9953e6-9337-4670-9db1-53430358b5de&width=768&dpr=3&quality=100&sign=28ad0f08&sv=2) [PreviousMobile Websiteschevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites) [NextGenerating App Keychevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/generating-app-key) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Introducing dark theme | Truecaller for Developers We have recently added support for dark mode to our verification consent screen. You can now customise the look and feel of the verification consent screen as per your app theme, and provide a rich experience to your users. Additionally, dark mode also reduces the strain on end users eyes in low lighting conditions. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FnXXE5cHvr6g2p7m0FiRE%252FAA.webp%3Falt%3Dmedia%26token%3Da286bd43-942d-47cf-b552-dabd61786f38&width=768&dpr=3&quality=100&sign=81c6a78e&sv=2) The support for customising the verification dialog in dark mode is being rolled out with the latest version of Truecaller app for users. Refer to our updated SDK documentation to know more on how this works. [PreviousApp Review Processchevron-left](https://docs.truecaller.com/truecaller-sdk/product-updates/app-review-process) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Handling Error Scenarios | Truecaller for Developers In case of error, didFailToReceiveTrueProfileWithError: will return an object of type TCError (a subclass of NSError). You can get the error code by invoking the method getErrorCode on the TCError object. The list of possible TCTrueSDKErrorCode values can be found in the API documentation. **Error Code** **Description** 1 App Key is Missing. The App Key is a mandatory field. It is provided to you by Truecaller. 2 App Link is Missing. The App Link is a mandatory field. It is provided to you by Truecaller. 3 The user has decided to cancel (abort) the operation of providing TrueProfile info to your app. 4 The user has not signed in using the Truecaller app yet. 5 The SDK version is old and not compatible with the Truecaller app. 6 The Truecaller app version is old and not compatible with the SDK version. 7 Current version of iOS is not supported. 8 Truecaller App is Not Installed. The Truecaller app is not installed. 9 Network Error occurred in network communication or no network connectivity 10 Truecaller internal error. 11 The user has not been authorized by Truecaller servers. 12 The credentials cannot be verified. Internal error. 13 The Profile content is not valid. Internal error. 14 Bad request. Internal error. 15 Verification Failed because the response signature could not be verified. Internal error. 16 The request's nonce does not match the nonce in response. Internal error. 17 View delegate is Nil or not set. 18 Invalid first name or last name. 19 Cannot open app because Universal Link failed 20 Please add Url Scheme to plist [PreviousCompleting Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/verifying-non-truecaller-app-users/completing-verification) [NextSafari Redirectionchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/handling-error-scenarios/safari-redirection) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Setup | Truecaller for Developers **Manual Installation** 1. Download the project zip file from the [release sectionarrow-up-right](https://github.com/truecaller/ios-sdk/releases) 2. Unzip the file 3. Copy the TruecallerSDK project files into your project ( TrueSDK directory, TrueSDKTests directory and TrueSDK.xcodeproj ) 4. Drag and drop TrueSDK.xcodeproj into your project ( i.e. add it as a subproject to your main project ). Embedding it this way will not require any additional script to be run. 5. Add the TruecallerSDK framework ( from Products output of TrueSDK.xcodeproj ) into the Embedded Binaries section of the General tab of your target. circle-info NOTE: We recommend using the Swift Package Manager. **Installation with Swift Package Manager (Recommended)** 1. Integrate your Swift package with Xcode by selecting “File” from the Xcode menu, then select “Add Packages” or use the keyboard shortcut Shift+Command+K 2. Search for truecaller SDK, use URL - [https://github.com/truecaller/ios-sdkarrow-up-right](https://github.com/truecaller/ios-sdk) ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXdtCk41RzO03e8IbTVwRyKS0mcJ0b_TMqCy3L1AQ_oGL0UKmNJWmhiqoidkdZDJNq7y7bLh9lWeROLnDFv2T0tdFXH7mx5m2AJnf8RYyOvtauC8ZvyyJNEyOjXjDpmVdfx2FhBN%3Fkey%3DvfNZ1xX2WgXJ-j5TIVfkkb9i&width=300&dpr=3&quality=100&sign=ad2650cd&sv=2) 3. Choose the package and select the latest version 4. Click "Add Package" to confirm 5. Select the target ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXfhngv6HJBKhVx1NVMv1e8mwVT2S4jsITE_z0SgLbaqBbMf_Bd2EYJ1iX-2E7NmTjrP0rw8b1uZAeOKCm239ReajI2ughM373LTUjNxXpAD2WAYrie2BR3w6qGBHVa4snjDyxe5dA%3Fkey%3DvfNZ1xX2WgXJ-j5TIVfkkb9i&width=300&dpr=3&quality=100&sign=456cbce3&sv=2) 6. Click "Add Package" to confirm. 7. Use the package in your Xcode project by importing it into your swift files. **Installation with CocoaPods** [CocoaPodsarrow-up-right](http://cocoapods.org/) is a dependency manager which automates and simplifies the process of using 3rd party libraries. You can install it with the following command: You can create your Podfile using the command ( in case you do not already have it ): To integrate TruecallerSDK into your Xcode project using CocoaPods, specify it in your `Podfile` : Then, run the following command: [PreviousIntegrating with your iOS Appchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app) [NextConfigurationchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/configuration) Last updated 11 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy $ gem install cocoapods Copy $ pod init Copy platform :ios, '8.0' use_frameworks! target 'TargetName' do pod 'TrueSDK' end Copy $ pod install sun-brightdesktopmoon --- # Handling Error Scenarios | Truecaller for Developers **Failure/ Error responses** The "onFailure" callback method that you just implemented in the previous step helps you to handle all the possible failure cases when the user couldn't be verified successfully via the Truecaller flow. Below are some of the possible failure scenarios and the corresponding error response that you receive for each of the cases : Error Description Error Code "Something went wrong" 0 "Device is not supported" 16 "Truecaller user has an invalid account state" 10 "Invalid partner or partner information is missing" 12 "Conflicting request code possible in onActivityResult()" 6 "Truecaller app closed unexpectedly" 7 "Truecaller app is not installed/loggedin" 5 "User denied by pressing the footer button" 11 "User denied by dismissing consent screen" 14 "User denied while loading" 2 "Truecaller sdk is old and not compatible" 6 Please note that when you encounter any of the error scenarios and get the control in the "onFailure()" method, you should redirect the user to your alternate verification flow. **Exceptions** In case you face any of the following run time exceptions, please follow the recommended steps as mentioned below : _"No compatible client available. Please change your scope"_ As the exception suggests, you are trying to call an SDK method even though no client is available to handle it. This usually happens if you have initialized the SDK using ONLY\_TC\_USERS scope option i.e to verify only the Truecaller users, and you are not calling isOAuthFlowUsable() method before calling an SDK method. To resolve this, call isOAuthFlowUsable() before calling any SDK method if you are using VERIFY\_TC\_USERS scope option. _"Please call init() on TruecallerSDK first"_ This exception suggests that you are trying to call an SDK method before the SDK has been initialised. To resolve it, check for all possible user flows in your app which could lead to calling an SDK method directly before it has been initialised. _"Add client id in your manifest"_ This exception suggests that you are trying to call SDK initialization/build method without having your clientID mentioned in your manifest as meta-data. _"OAuth scopes cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth scopes. _"OAuth state cannot be null or empty"_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the OAuth state. _“Code challenge cannot be null or empty”_ This exception suggests that you are trying to call SDK method - getAuthorisationCode before setting up the Code challenge. [PreviousClearing SDK Instancechevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/clearing-sdk-instance) [NextIntegrating with your Backendchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Release Ready | Truecaller for Developers [Instrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/instrumentation) [Testing your verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/testing-your-verification-flow) [PreviousHandling Error Scenarioschevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/handling-error-scenarios) [NextInstrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/instrumentation) Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Server Side Response Validation | Truecaller for Developers [For Truecaller users verification flow](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-truecaller-users-verification-flow) [For Non-Truecaller users verification flow](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-non-truecaller-users-verification-flow) [PreviousAdvanced Stepschevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/advanced-steps) [NextFor Truecaller users verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-truecaller-users-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non-Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for non-Truecaller users If the user does not have the Truecaller app present on their device or they chose to verify using a different number than the one already verified on Truecaller app currently, they can be taken to this flow in which we provision the verification of the user by sending missed call using our infrastructure. **User verifying via Truecaller's missed call mechanism for the very first time** Proceed to the flow where the user needs to input their mobile number. Give the necessary permissions ( as described [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) ) and proceed with the verification. You would receive a missed call on the device which gets automatically detected by the SDK. Post this, you need to pass the user's first name and last name to the SDK to complete the verification **User already verified with the same credentials previously on the smartphone** Once a user's verification is completed successfully on a particular device, and they re-attempt to verify on the same app using the same credentials ( same smartphone, same mobile number ), Truecaller SDK is able to identify the user and we can tell you it's the same user. In this case, no additional missed call / OTP is needed to re-verify the user. The SDK will directly tell the status of the repeat user, and in this case returns the first name and last name of the user back to you in response. [PreviousTesting your verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow) [NextTruecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # FAQS | Truecaller for Developers Get detailed answers to all your queries around Truecaller SDK here. [PreviousDeactivating App Blockchevron-left](https://docs.truecaller.com/truecaller-sdk/shopify-app/deactivating-app-block) [NextGeneralchevron-right](https://docs.truecaller.com/truecaller-sdk/faqs/general) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Google play store app permission declaration form | Truecaller for Developers This section is only relevant for apps who are using the Truecaller SDK for verifying non-Truecaller user as well and seek phone permissions from the users If you are using the functionality of verifying non Truecaller users also via the SDK, your app would need specific phone permissions as has been described in this [sectionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification) . If you are using the Truecaller SDK for verification of existing Truecaller users only ( 1-tap flow ), you can skip this section. As you upload the new app build to PlayStore with user verification feature via Truecaller SDK and the requisite permissions, you might be asked to fill an app permission declaration form. We are sharing some tips on how to appropriately justify the need for these permissions for your verification flow : **#1: In one sentence, please describe the core functionality of your app.** To be defined by you as a publisher of your app **#2: What is the core functionality in your app requiring the Call Log and / or SMS permissions?** Mobile number verification to onboard users on This is in-line with Google’s allowed usage of this permission for account verification via phone call, as stated here: https://support.google.com/googleplay/android-developer/answer/9047303 Flow: a)Enter mobile number b)Request READ\_CALL\_LOG permission c)Initiate drop call from 3rd party service to respective number d)Drop call hits user’s device and is rejected automatically via above permission to complete verification **#3: Do any of the following disallowed use cases apply to your app’s core functionality request for Call Log or SMS permissions?** NO **#4: Do any of the following other use cases apply to your app’s core functionality request for Call Log or SMS permissions?** OTP & Account verification via Phone Call (select this from the given list of options) **#5: Is your app’s use of Call Log or SMS permissions to provide functionality required by law or regulation?** No **#6: Other** We use drop call based verification of users’ mobile number for account creation or logging into their accounts. Such method of mobile number verification results in better verification success rates in our key markets like India, etc. _Android guidelines for asking app permissions from user_ [https://developer.android.com/training/permissions/requestingarrow-up-right](https://developer.android.com/training/permissions/requesting) [PreviousTest Setupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/test-setup) [NextMoving to Productionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/moving-to-production) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Token | Truecaller for Developers Using the “state” from step 10, “code verifier” from step 12, and the “authorization code” from step 9, you need to make a network call to Truecaller’s backend so as to fetch the access token : `POST` `https://oauth-account-noneu.truecaller.com/v1/token` **Headers** Name Type Description Content-Type\* application/x-www-form-urlencoded String **Request Body** Name Type Description grant\_type "authorization\_code" // hardcoded value String client\_id code Authorisation code from TcOAuthData callback from step 9 code\_verifier From step 12 200: OK Success { "access\_token": "some-access-token", "expires\_in": 3600, "token\_type": "Bearer" } 400: Bad Request - If grant type is not supported 403: Forbidden - If client id is invalid 500: Internal Server Error - Unexpected error on the server side 400: Bad Request - Some of the parameters are empty in the request 403: Forbidden Valid grant type but not allowed for the client 403: Forbidden Invalid auth code provided 403: Forbidden Invalid/expired auth code in provided 403: Forbidden Invalid/expired code verifier is provided 429: Too Many Requests If the number of requests exceeds the allowed limit 503: Service Unavailable Resource unavailable due to server-side issue **Sample cURL request :** Copy curl --location --request POST 'https://oauth-account-noneu.truecaller.com/v1/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=<>' \ --data-urlencode 'code=<>' \ --data-urlencode 'code_verifier=<>' [PreviousIntegrating with your Backendchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend) [NextFetching User Profilechevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-profile) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # SDK v2.8.0[Deprecating Soon ⚠️] | Truecaller for Developers [Implementing user flow for your appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/implementing-user-flow-for-your-app) [Scenarios for all user verifications : Truecaller and Non Truecaller Userschevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [Generating App Keychevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/generating-app-key) [Integrating with your Appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app) [Server Side Response Validationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation) [Instrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/instrumentation) [Getting Release Readychevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready) [Changelogchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/changelog) [PreviousMoving to Productionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/moving-to-production) [NextImplementing user flow for your appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/implementing-user-flow-for-your-app) Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating App Key | Truecaller for Developers To ensure the authenticity of interactions between your web app and Truecaller, you need to generate an app key \[ partner key \] from Truecaller developer account ( [https://developer.truecaller.com/loginarrow-up-right](https://developer.truecaller.com/login) ) by adding your app name, domain and a callback URL. To generate a new app key for your mobile website, go to the 'MANAGE APPS' section on the developer account dashboard and click on 'CREATE APP'. Select 'Web' in the App type and continue to enter your app details. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FvpemJUkSScjqXIUld3DV%252FF.avif%3Falt%3Dmedia%26token%3D5c033355-ff83-4a8b-95af-d01d4f11bbfd&width=768&dpr=3&quality=100&sign=4fd78b95&sv=2) _App domain_ corresponds to the domain link of your website _Callback URL_ corresponds to an endpoint on your backend where we will post the access token for you to fetch the user's profile. Every access token can be used to fetch the profile only of the related user granting the authorization to your app. circle-info When setting up the callback URL, please consider the following: **Method:** All access token requests will be submitted as POST request. Make sure your service is async, since we only expect that the message is accepted from your side. The service should respond within maximum 3 seconds upon receiving the request. Each access token has a time-to-live (10 minutes) and if not used within the TTL, the user needs to re-trigger the authorization process from the beginning. **Security:** To ensure security and privacy, HTTPS should be used. Make sure your certificate is always valid. **Request Params:** **Param \[String\]** **Mandatory** **Description** **Example value** requestId \[String\] yes vXbyFPwqiCAHZyxAldA9M9DDXKk= accessToken \[String\] yes a3sAB0KnGANg4VZwIXfhUyFmPbzoONofl4FjIItac0JQSODp6niW8oBr33uOI-u7 circle-info **Expected Response Codes:** * 2\*\* OK Once you input your app details and create the app, you will be able to see a unique "appKey" for your app which you need to include in your project to authorise all verification requests. [PreviousImplementing user flow for your Mobile Websitechevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/implementing-user-flow-for-your-mobile-website) [NextIntegrating with your mobile websitechevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integrating with your Backend | Truecaller for Developers [Fetching User Token](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-token) [Fetching User Profile](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-profile) [PreviousHandling Error Scenarioschevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/handling-error-scenarios) [NextFetching User Tokenchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-token) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Handling Error Scenarios | Truecaller for Developers There can be certain cases where users might not wish to share their Truecaller profile information with your mobile website, and may dismiss the profile dialog when invoked. For such cases, we pass appropriate error message to your callback URL so that you can accordingly take the next steps. Other error scenarios might include cases where your backend fails to fetch user profile information from Truecaller probably due to some internal or network failure. These cases can be identified by having a threshold timeout ( recommended 30 seconds ) implemented with your client-server communication mechanism. In scenarios like above, where the user verification via Truecaller could not be completed, you should ideally show a proper error message to the users and take them to your alternate verification flow. [PreviousCompleting User Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/completing-user-verification) [NextGetting Release Readychevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Testing your verification flow | Truecaller for Developers **Truecaller app present and registration completed on Truecaller app** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Open your mobile website and initiate the Truecaller verification flow. The user should see the Truecaller profile dialog. Click on continue to complete the verification flow and ensure that the verification is completed. **Truecaller app present but registration not completed on Truecaller app** Ensure that the Truecaller app is present on your device but you have _not_ completed the profile creation step on Truecaller app. Open your mobile website and initiate the Truecaller verification flow. The user should see not the Truecaller profile dialog, and the user should ideally be redirected to your alternate verification flow. **Truecaller app not present on the device** Remove the Truecaller app from your device. Open your mobile website and try to initiate the Truecaller verification flow. The user should see not the Truecaller profile dialog and should be taken to either your alternate verification flow. **Ensure that you receive proper responses on your callback URL** Initiate the Truecaller verification flow in your mobile website ( Truecaller app should be present on device ) to invoke the Truecaller profile dialog. One by one, try the following scenarios and ensure that you should receive the appropriate response from Truecaller's backend stating the corresponding message as described below : - Click on 'Continue' button. Copy {"requestId":"RL8YZ41FQMt5Jiak2sc_Ys0OgQA=","accessToken":"a1asX--8_yw-OF--E6Gj_DPyKelJIGUUeYB9U9MJhyeu4hOCbrl","endpoint":"https://profile4-noneu.truecaller.com/v1/default"} \- Press the system back button - Click on '_Use another mobile number_' OR '_Skip_' on the truecaller dialog Copy {"requestId":"WZqlS6PqY0ycO3mKlEuI=","status":"user_rejected"} We also recommend that you go through the [FAQ sectionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/faqs/mobile-web-sdk) to go through some of the commonly asked questions. [PreviousInstrumentationchevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/instrumentation) [NextiOSchevron-right](https://docs.truecaller.com/truecaller-sdk/ios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Testing your verification flow | Truecaller for Developers [Non Truecaller User Verification](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification) [Truecaller user verification flow](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [Test Setup](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousGetting Release Readychevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready) [NextNon-Truecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Moving to Production | Truecaller for Developers [PreviousGoogle play store app permission declaration formchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/google-play-store-app-permission-declaration-form) [NextSDK v2.8.0\[Deprecating Soon ⚠️\]chevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon) Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Truecaller user verification flow | Truecaller for Developers Common scenarios to check for in you app verification flow for existing Truecaller users **Truecaller app present and registration completed on Truecaller app** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should see the Truecaller profile dialog. Click on continue to complete the verification flow and ensure that the verification is completed. **Truecaller app present but registration not completed on Truecaller app** Ensure that the Truecaller app is present on your device but you have _not_ completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog, and you would receive the control in onFailureProfileShared() with the specific error code. **Truecaller app not present on the device** Remove the Truecaller app from your device. Open your app and try to initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog and should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. **Network not available on device** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Turn off the mobile data and WiFi on your device. Open your app and initiate the Truecaller verification flow. You would see the Truecaller profile dialog. Click on continue button on the dialog, you would receive control in onFailureProfileShared() method with a specific error code. **Client ID should be working fine ( onFailure() Error Type 12)** For complete details on this part, please refer [here](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/generating-client-id) . **User wishes to proceed with another number OR does not want to share their Truecaller profile** Initiate the Truecaller verification flow in your app to invoke the Truecaller profile dialog. Click on _system back_ or _Use another mobile number_ button on the dialog to dismiss the dialog. In such a scenario, user should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. We also recommend that you go through the [FAQ section](https://docs.truecaller.com/truecaller-sdk/faqs/general) to go through some of the commonly asked questions. [arrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousNon-Truecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) [NextTest Setupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/test-setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Usage | Truecaller for Developers [Swiftchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage/swift) [Objective-Cchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage/objective-c) [PreviousConfigurationchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/configuration) [NextSwiftchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage/swift) Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Change Log | Truecaller for Developers SDK Version Changelog ( if applicable ) 3.2.1 1. Added Sim and Device Parameters 3.2.0 1. Update OnActivityResult deprecated method with androidx ActivityResultLauncher API. 2. Added Dark Mode for OAuth SDK PopUp and BottomSheet flow. 3. Added Center Popup Ui for OAuth flow. 4. Adjusted isOauthFlowUsable method logic to solve for sequence of installation 3.1.0 1. Added support for IM-OTP as a mode of verification in the non-tc flow with auto-read functionality. (This functionality is under EAP currently) 2. Updated AGP to 8.3 3. Minor bug fixes 3.0.0 1. The first public version of Truecaller OAuth SDK [PreviousChangelogchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/changelog) [NextMobile Websiteschevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites) Last updated 5 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Scenarios for all user verifications : Truecaller and Non Truecaller Users | Truecaller for Developers Truecaller SDK enables you to verify your user's mobile number in a seamless way. For users who have Truecaller app present on their smartphones and are already registered Truecaller users, they get verified in a 1-tap flow (_supported globally_), without the need of any manual input. For users who don't have Truecaller app present on their smartphones, the SDK enables user verification by means of drop call, which is triggered to the user's number in background to complete the verification flow (_currently supported only for India_). To understand various possible user scenarios in the user's verification flow, let's try to take example of NoBrokerHood, India's leading realty app. NoBrokerHood is using Truecaller SDK for verifying numbers of all their users. _**Scenario 1**_ a) New user on NoBrokerHood app, and b) Truecaller app present on user's smartphone. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FAl7XT4aeuHJmwr05bGVU%252F6.webp%3Falt%3Dmedia%26token%3Da149b0cc-f6bc-4eaa-a364-fc88304e7fef&width=768&dpr=3&quality=100&sign=a0d9cf7b&sv=2) _**Scenario 2**_ a) Existing user on NoBrokerHood app, and b) Truecaller app present on smartphone. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FvbEvGZwb6VCITqbBPrk6%252F7.webp%3Falt%3Dmedia%26token%3D4b628043-331c-4287-9a1c-33add1dbf21b&width=768&dpr=3&quality=100&sign=8ad2a666&sv=2) _**Scenario 3**_ a) New user on NoBrokerHood app, and b) Truecaller app **NOT** present on smartphone, and user's mobile number **NOT** already verified on smartphone. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FSeMz2v80NSn9MnUFsLI2%252F8.webp%3Falt%3Dmedia%26token%3D1e64c366-ed1c-4757-b17e-b6ed620f9c91&width=768&dpr=3&quality=100&sign=cc23086a&sv=2) _**Scenario 4**_ a) Existing user on NoBrokerHood app, and b) Truecaller app **NOT** present on smartphone and user's mobile number **NOT** verified on smartphone. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F6JX8WRH07PLjpTRJPymM%252F9.webp%3Falt%3Dmedia%26token%3Da55b1812-1f66-42c7-abd3-aeef1aacbab9&width=768&dpr=3&quality=100&sign=3767a114&sv=2) _**Scenario 5**_ a) Existing user on NoBrokerHood app, and b) Truecaller app **NOT** present on smartphone and user's mobile number **ALREADY** verified on smartphone. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FXvIlgxVdMnkMPMINPrOD%252F10.webp%3Falt%3Dmedia%26token%3Ddd9db2ca-713e-4886-a2ed-32e550fe5b65&width=768&dpr=3&quality=100&sign=c85d6252&sv=2) [PreviousImplementing user flow for your appchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/implementing-user-flow-for-your-app) [NextGenerating App Keychevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/generating-app-key) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Invoking verification | Truecaller for Developers Once you have set the deep link parameters, you are ready to invoke the Truecaller verification on your mobile web page. You need to invoke the deep link using Javascript on your webpage. This will show the Truecaller verification dialog to the user if the Truecaller app is present on the user's mobile device. Please note that in case Truecaller app is not present on the user's device, the deep link won't trigger anything. To effectively handle this case, you should use the deep as suggested in the example below : Copy window.location = "truecallersdk://truesdk/web_verify? type=btmsheet requestNonce=UNIQUE_REQUEST_ID &partnerKey=YOUR_APP_KEY &partnerName=YOUR_APP_NAME &lang=LANGUAGE_LOCALE &privacyUrl=LINK_TO_YOUR_PRIVACY_PAGE &termsUrl=LINK_TO_YOUR_TERMS_PAGE &loginPrefix=TITLE_STRING_PREFIX &loginSuffix=TITLE_STRING_SUFFIX &ctaPrefix=BUTTON_TEXT_PREFIX &ctaColor=BUTTON_FILL_COLOR &ctaTextColor=BUTTON_TEXT_COLOR &btnShape=BUTTON_SHAPE &skipOption=FOOTER_CTA_STRING &ttl=TIME_IN_MILLISECONDS"; setTimeout(function() { if( document.hasFocus() ){ // Truecaller app not present on the device and you redirect the user // to your alternate verification page }else{ // Truecaller app present on the device and the profile overlay opens // The user clicks on verify & you'll receive the user's access token to fetch the profile on your // callback URL - post which, you can refresh the session at your frontend and complete the user verification } }, 600); ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FPpwpAGO9sahNqE88DQ78%252Fi.webp%3Falt%3Dmedia%26token%3Ddfd22e58-2ad6-4f29-986b-0a975a243370&width=768&dpr=3&quality=100&sign=cc3bfc12&sv=2) This would trigger the deep link, and open the user's Truecaller profile dialog if the app is present on the device. And in case the app is not present, nothing opens. So now, using javascript, you can check for the document focus: **a.** If the truecaller dialog opened, the document would have lost focus and you'll be taken to the else condition in the above check. **b.** While in case the Truecaller app is not present on the device, the focus would always remain with the document and hence, you'll have the control in the 'if' condition. Accordingly, you can map the next action on your page based on the two conditions. When you trigger the Truecaller verification flow, you would receive a prompt confirmation that the flow has been initiated successfully. When the Truecaller deeplink is invoked, and the user has the Truecaller application installed and logged in, a callback is sent to your configured URL. This callback includes the configured request nonce and status as "flow\_invoked." Here is the sample of how the handshake callback looks like : Upon receiving the "flow\_invoked" request notification, it is imperative for you to promptly reciprocate with an acknowledgment. This acknowledgment should be accompanied by a response code falling within the 2XX range, signifying successful communication. This approach minimises reliance on "document.hasFocus". By leveraging the Handshake feature and receiving real-time callbacks, partners gain greater confidence and control in the user verification process, leading to a smoother user experience overall. circle-info Please note that the Truecaller verification flow for mobile websites is currently supported for browsers on Android OS only. You can gracefully handle invoking Truecaller SDK only on Android and not iOS, by using either of the below to detect the iOS platform: 1) Looking for User Agent `var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;` 2) Another way is relying on navigator.platform: `var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);` iOS will be either true or false [PreviousInitialisationchevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/initialisation) [NextFetch User Profilechevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/fetch-user-profile) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy { "requestId": "<>", "status": "flow_invoked" } sun-brightdesktopmoon --- # Integrating with your mobile website | Truecaller for Developers **If you haven't already completed** [**User flow implementation guide**](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) **for your app, we recommend you to complete that first before proceeding with the integration.** [PreviousGenerating App Keychevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/generating-app-key) [NextInitialisationchevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/initialisation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Configuration | Truecaller for Developers Add the entry truesdk under LSApplicationQueriesSchemes in into your Info.plist file Copy LSApplicationQueriesSchemes truesdk ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FpZkRrui1tvCUaiqGlqTa%252FL.png%3Falt%3Dmedia%26token%3Def74410c-41ae-4c1e-861e-7c498559ef2a&width=768&dpr=3&quality=100&sign=3b1a5a8&sv=2) Add the associated domain provided by Truecaller (for example applinks:si44524554ef8e45b5aa83ced4e96d5xxx.truecallerdevs.com) in Your project -> Capabilities > Associated Domains. The prefix 'applinks:' is needed for universal links to function properly. circle-info **Important:** Replace the '**https://**' part from the provided app link with "**applinks:**". ie `_https://si44524554ef8e45b5aa83ced4e96d5xxx.truecallerdevs.com_` should become `_applinks:si44524554ef8e45b5aa83ced4e96d5xxx.truecallerdevs.com_` while adding to entitlements. (Note that there is **no** _http://_ or _https://_ prefix when setting up the applinks:) Starting with SDK version 0.1.7, when redirection from Truecaller app to partner app fails (due to Universal Link failure) an error message is passed from Truecaller app using url scheme with following error details: `error code: 19 error description: "Cannot open app because Universal Link failed".` Starting with SDK version 0.1.7, It is mandatory to register urlScheme in your project, in the below format: `truecallersdk-<#YOUR_APP_KEY> e.g if your app key is I7ViZ490028736bba408881687123b4cec49f, url scheme to be registered is truecallersdk-I7ViZ490028736bba408881687123b4cec49f` ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FJ62qNp5vHZkbgAJgRyVH%252Fm.png%3Falt%3Dmedia%26token%3D469daddc-0a91-4f04-add6-362806e8c5c4&width=768&dpr=3&quality=100&sign=14bc25d0&sv=2) Please note that if you are using an older version of Truecaller SDK, an error message will be shown in the Truecaller app asking the user to manually navigate back to the partner app. [PreviousSetupchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/setup) [NextUsagechevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Completing Verification | Truecaller for Developers Once you receive a callback in your VerificationCallback instance with the callbackType `TYPE_MISSED_CALL_RECEIVED`, you can complete the verification process by calling the following method from within your activity : Copy Copy TrueProfile profile = new TrueProfile.Builder(firstName, lastName).build(); TcSdk.getInstance().verifyMissedCall(profile, verificationCallback) 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 ). [PreviousNon Truecaller User Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification) [NextTrueExceptionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification/trueexception) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implementing user flow for your app | Truecaller for Developers While you start integrating Truecaller SDK, as the very first step, it is important to work on designing the right user flow, so that you can achieve desired results. Truecaller SDK is a mobile number verification service, without the need for any OTP whatsoever. The right way to implement Truecaller SDK in your mobile app, is to invoke mobile number verification via Truecaller at touch points, where you have your users to sign-up/ login/ checkout by verifying their mobile numbers. circle-info Let us now see an example to understand how to effectively use Truecaller SDK at such touch points in your user journey. When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number based identity verification of users. Here is such an example from NoBrokerHood - India’s leading visitor management platform: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FduZjCUuyeHFgSHWo0igx%252F1.webp%3Falt%3Dmedia%26token%3D141c123b-f47b-45e6-be60-4ab87f01f517&width=768&dpr=3&quality=100&sign=3d55a117&sv=2) ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FQzJ1jdyngxiR1C1bHuEb%252F2.avif%3Falt%3Dmedia%26token%3Df2e882c9-6c70-4ac2-96f5-ff1d70e1a4ab&width=768&dpr=3&quality=100&sign=a19eab8&sv=2) **Building for Various Touch points** **a. Invoking user signup/ login/ verification via Truecaller at app onboarding** Example : NoBroker - India’s leading realty app When mobile apps onboard their users, there are multiple ways in which they address the onboarding process. For example, one could address it as Get Started, Join Us, Login, Sign up, etc., shown as a button to the users, clicking which leads to the mobile number based identity verification of users. Here is such an example from NoBroker: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FXlPhLLOL2iRUmZWTEoDX%252F3.png%3Falt%3Dmedia%26token%3D20ff0dc8-ced6-4a80-bd7a-260f05b0d5f9&width=768&dpr=3&quality=100&sign=31fcfda3&sv=2) **b. Directly invoking verification via Truecaller** Example : Vyapar - India's fastest growing Invoice & Billing app for small businesses Vyapar has mobile number as the primary identifier for its users. So as soon as users lands on their mobile number login/ signup screen, it invokes Verification via Truecaller, and onboards it’s users within seconds in just 1-tap. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FVBL2VYdGba2Vqh08vYZk%252F4.webp%3Falt%3Dmedia%26token%3Dcc859bb5-5757-402b-8a33-8e159ea2a664&width=768&dpr=3&quality=100&sign=d1b17230&sv=2) **c. Performing user verification at checkout** Example : Chalo - available in 25+ cities, tracks buses live and tells you what time your bus will reach your stop Chalo allows users to browse through it’s app and check for bus ETAs, without needing to sign-up or log-in. However, when users wish to purchase the ticket or travel pass, it requires users to verify their mobile number. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FUOmwOzIueGx9WUY24rmB%252F5.webp%3Falt%3Dmedia%26token%3D667441b7-c20e-418f-ad21-ac95b07b6ff3&width=768&dpr=3&quality=100&sign=63d61bfe&sv=2) Now that we have gone through and understood how to implement Verification via Truecaller, let’s get started with the SDK integration. [PreviousSDK v2.8.0\[Deprecating Soon ⚠️\]chevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon) [NextScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Verifying Non-Truecaller app users | Truecaller for Developers This section defines the steps that can be used to trigger verification of non Truecaller app users which will be powered via Truecaller's SMS based OTP ( Currently available only for India ) On the Mobile number entry screen set the below delegates : **Swift:** `TCTrueSDK.sharedManager().delegate = self TCTrueSDK.sharedManager().viewDelegate = self` **Objective C:** `[TCTrueSDK sharedManager].delegate = self; [TCTrueSDK sharedManager].viewDelegate = self;` circle-info viewDelegate needs to be set on the mobile number entry screen i.e. OTP flow (not required for Truecaller one tap flow for Truecaller users verification). Initiate the verification for the user by calling the following method: **Swift:** `TCTrueSDK.sharedManager().requestVerification(forPhone: <#PHONE_NUMBER_STRING>,countryCode: <#DEFAULT_COUNTRY_CODE>)` **Objective C:** `[[TCTrueSDK sharedManager] requestVerificationForPhone:<#PHONE_NUMBER_STRING> countryCode:<#DEFAULT_COUNTRY_CODE>];` circle-info * the first parameter (PHONE\_NUMBER\_STRING) is the 10-digit mobile number * the second parameter is the country code (DEFAULT\_COUNTRY\_CODE) of the mobile number for which the verification needs to be triggered(“IN” for India) Once you initiate the verification using the above _requestVerification()_ method, the below delegate method will be called along with the verification state. **Swift:** `func verificationStatusChanged(to verificationState: TCVerificationState)` **Objective C:** `(void)verificationStatusChangedTo:(TCVerificationState)verificationState;` _verificationStatusChanged()_ delegate method is called under any of the following scenarios : * When OTP is successfully triggered for the input mobile number. In this case, you will get the verificationState as _TCVerificationState.otpInitiated_ * When the verification is successful for a particular number. In this case, you will get the verificationState as _TCVerificationState.verificationComplete_ * When the user is already verified on that particular device. In this case, you will get the verificationState as _TCVerificationState.verifiedBefore_ Possible Verification states (TCVerificationState) : State Description TCVerificationStateOTPInitiated Returned when OTP is successfully initiated by Truecaller TCVerificationStateOTPReceived Returned when OTP is successfully registered by the partner to Truecaller. TCVerificationStateVerificationComplete OTP verification successful at Truecaller TCVerificationStateVerifiedBefore The user has already been signed in from this device When verificationState is _TCVerificationState.otpInitiated_, you will also receive an additional parameter for the time to live i.e TTL (in seconds) which can be fetched using:- **Swift** `TCTrueSDK.sharedManager().tokenTtl()` **Objective C** `[[TCTrueSDK sharedManager] tokenTtl];` This value determines the amount of time left to complete the verification. You can use this value to show a waiting message to your user before they can try for another attempt. Once the TTL expires, you can either auto-retry the verification by calling the requestVerification() method automatically with the same input parameters OR you can also take the user back to the number input screen to enter a different number for verification. Once the OTP is initiated, allow the user to enter the OTP, first name and last name. When the verification status is _TCVerificationStateVerifiedBefore_ or _TCVerificationStateVerificationComplete_, it means that the user verification via Truecaller SDK is complete. In these cases, the SDK will share an additional access token with your application, which you may then use to validate the response at your server end. To fetch the access token, you may use the following code snippet: **Swift** `TCTrueSDK.sharedManager().accessTokenForOTPVerification()` **Objective C** `[[TCTrueSDK sharedManager] accessTokenForOTPVerification];` After fetching the access token, you may perform the server side validation by referring to the steps mentioned in the later part of the documentation here. Below mentioned didFailToReceiveTrueProfileWithError() method will be called when some error has occurred while verifying the provided mobile number. You will receive the appropriate error message from TCError using TCError.getErrorCode(). For details of different possible error types you may encounter, please refer to the next section **Swift** `func didFailToReceiveTrueProfileWithError(_ error: TCError)` **Objective C** `- (void)didFailToReceiveTrueProfileWithError:(nonnull TCError *)error` [PreviousObjective-Cchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage/objective-c) [NextCompleting Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/verifying-non-truecaller-app-users/completing-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Generating App Key | Truecaller for Developers To ensure the authenticity of interactions between your app and Truecaller, you need to generate an app key \[ partner key \] from Truecaller [developer accountarrow-up-right](https://developer.truecaller.com/login) by adding your app name, package name and app SHA-1. To generate a new app key for your Android app, go to the 'MANAGE APPS' section on the developer account dashboard and click on 'CREATE APP'. Select 'Android' in the App type and continue to enter your app details. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FmyQ3mxvqdPeTYI2O7p6Z%252F11.png%3Falt%3Dmedia%26token%3D7923c8c9-017f-4a94-886e-6087134fc865&width=768&dpr=3&quality=100&sign=6498bdc3&sv=2) You package name corresponds to the applicationId in your app level _build.gradle_ file. You can get to know the SHA1 for your different app builds by following these steps : * Open your project in android studio * Click on gradle menu on the right side and expand it * Click on android and then signing report ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F14D4V8TdlDzVDZIolAjI%252F12.avif%3Falt%3Dmedia%26token%3D0eeb1f4b-8015-4610-b3df-12f5981c958f&width=768&dpr=3&quality=100&sign=80e9e151&sv=2) You should be able to see the SHA1 fingerprint of your different build configurations \[ debug /release \] in the terminal window within android studio. Once you input your app details and create the app, you will be able to see a unique "appKey" for your app which you need to include in your project to authorise all verification requests. circle-info Different app builds ( debug / release ) have different SHA1 fingerprints and hence would have different & unique app keys, as a single app key corresponds to a particular combination of package name and SHA1. You need to manage your debug / release builds by creating separate keys. [PreviousScenarios for all user verifications : Truecaller and Non Truecaller Userschevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) [NextIntegrating with your Appchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Test Setup | Truecaller for Developers **Quick guide on getting your test setup ready to test the common verification scenarios as described in previous sections:** **Pre-Requisites** * We suggest you to keep handy at-least 2 android smartphones with active SIM connections. Ensure that both the smartphones have your test app installed (Integrated with Truecaller SDK) * 2 different smartphones are required so that in case you get verified on one of the smartphones, you can use the second smartphone to check for the fresh verification scenarios. circle-info _Wi-Fi or mobile internet should also be enabled on both the smartphones_ **Steps to follow for testing user scenarios :** **User State** **App Scenario** **Steps** Existing Truecaller user * Install Truecaller on smartphone 'A' * Complete profile creation step on Truecaller app * Launch your application and initiate the Truecaller verification flow * Truecaller profile consent screen should appear * Tapping on Continue button should verify the user Non Truecaller User User _getting verified for the first time_ on smartphone * Take smartphone 'A' * Uninstall Truecaller app from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs & phone permissions are asked ( if not already granted ) * Allow the permissions to enable receiving a drop call * User is manually asked to enter name ( if it's a new user on your app ) * On entering the name, SDK verifies the user Non Truecaller User User _already verified_ on the smartphone and tried to re-verify _( Please ensure that you try this step only after you have performed the above step )_ * Take smartphone 'A' * Launch your application and logout from the app * Initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone Non Truecaller User User _already verified_ on the smartphone, uninstalls and re-installs the application on the device _( Please ensure that you try this step only after you have performed the 2nd step )_ * Take smartphone 'A' * Uninstall your application from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone [PreviousNon-Truecaller User Verification Flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) [NextGoogle Play App Signingchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-app-signing) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # For Truecaller users verification flow | Truecaller for Developers **Recommended Steps for validating the authenticity of SDK response at your server side:** Truecaller SDK already verifies the authenticity of the response before forwarding it to your app. However, if you wish to additionally check the authenticity of the response at your end, you can do so. In the response for TrueProfile we return - * Payload, which is a Base64 encoding of the json object containing all profile info * Signature, which contains the payload's signature . Signature is generated by applying signing algorithm with our private key * Signature Algorithm in the response header To verify the payload, our public key for a given algorithm can be fetched using this API: [https://api4.truecaller.com/v1/keyarrow-up-right](https://api4.truecaller.com/v1/key) . Using the payload, the signature and the public key, you can verify that the content sent is authentic through the following flow: a. Apply verification, which means apply our public key to the signature (with given algorithm) and comparing result with payload b. If verified, you would know that response comes from Truecaller's backend and is authentic. The profile can then be used as base64 decoding of the payload. For details on the verification flow and sample code snippets in different programming languages, please refer this [linkarrow-up-right](https://github.com/truecaller/backend-sdk-validation) In order to add another layer of security, you can also put a check to identify if the payload that is passed on to your server was initially generated for your app (package name) itself. The payload that you receive in the success response has a field with a key as “**verifier**”. Here, you need to generate HMAC SHA256 of your package name, using your _appKey_ (partner key) as a secret. (The appKey mentioned here is the one that you generate from our developer portal). The output that you get from above should match the verifier value received in the payload. In case it doesn't, which means that the payload that was generated was tampered. [PreviousServer Side Response Validationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation) [NextFor Non-Truecaller users verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-non-truecaller-users-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integrating with your iOS App | Truecaller for Developers To ensure the authenticity of interactions between your app and Truecaller, you need to generate an app key \[ partner key \] and app link from Truecaller developer account ( [https://developer.truecaller.com/loginarrow-up-right](https://developer.truecaller.com/login) ) by adding your App Name, Bundle Id and prefix. To generate a new app key for your iOS app, go to the 'MANAGE APPS' section on the developer account dashboard and click on 'CREATE APP'. Select 'iOS' in the App type and continue to enter your app details. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fxjalgmokkv5BhCIoJRV9%252Fj.png%3Falt%3Dmedia%26token%3De804efeb-8113-4437-b731-4d0bf77db805&width=768&dpr=3&quality=100&sign=58c8d6c1&sv=2) You can find your App Id in the "Apple Development Portal". If you do not have App Id yet, then open Project -> Capabilities -> Enable Associated Domains. New app id will be automatically created by Xcode. To find the Prefix, go to the member center on [https://developer.apple.comarrow-up-right](https://developer.apple.com/) and look at "Certificates, Identifiers & Profiles", click "Identifiers", then "App IDs" in the section under "Identifiers". Find your app, click on it, and there you will be able to see the Prefix value ( Refer image below ). ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FN01MZ7vOVQlV5ddyWd0S%252Fk.png%3Falt%3Dmedia%26token%3D64a0df89-7b6a-4782-bb6f-1a59d30e730d&width=768&dpr=3&quality=100&sign=822f94d1&sv=2) Once you input your app details and create the app, you will be able to see the "App Key" and "App Link" values for your app. You need to include these values in your project to authorise all the verification requests. [arrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/getting-release-ready/testing-your-verification-flow) [PreviousGenerating App Keychevron-left](https://docs.truecaller.com/truecaller-sdk/ios/generating-app-key) [NextSetupchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Developer Account | Truecaller for Developers **How can I access my Truecaller developer account ?** * You can create your Truecaller developer account by signing up here : [https://developer.truecaller.com/sign-uparrow-up-right](https://developer.truecaller.com/sign-up) * If you already have a Truecaller developer account, you can simply login to your account here : [https://developer.truecaller.com/loginarrow-up-right](https://developer.truecaller.com/login) **What can I do with my Truecaller developer account ?** Once you setup your Truecaller developer account you can: * create new applications and get respective app keys for using Truecaller SDK * edit an existing app * reset your account password **How can I add an app in my account ?** * For Android apps, you need a valid app name, package name, SHA1 fingerprint and Google app hash code ( optional ) for your app build * For iOS apps, you need a valid app name, bundle Id and a teamId * For mobile web apps, you need a valid name, public url \[ domain name \] for the web app and a publicly accessible callback URL \[ an endpoint on your server where Truecaller’s server will post a user’s access token once they give consent to share their Truecaller profile with your app \] **Things that I need to keep in mind -** While creating a new app, you cannot have : * more than one active android app with the same combination of package name and SHA1 fingerprint * more than one active iOS app with the same bundle Id and teamId * more than one active mobile web app with the same public url and callback URL * If you want a new key for the same combination of params, you will need to deactivate the existing app first and then create a new one with the same identifiers While editing an already existing app, you can only edit the following : * App name in case of android / iOS apps * Callback URL in case of web apps \[ Please note that once you change the callback URL, it might take up to 30 minutes for the caching to clear out and reflect in our systems \] You will not be able to edit main identifiers of apps such as package name, fingerprint, bundleId, teamId In case you need to have an app with the same package name but a different fingerprint, you should create a new app. You can also activate and deactivate your application. You cannot activate an application with identifiers that are already used by any of your existing apps. **I have more than one developer account. I wish to have only one account through which I should be able to manage all my apps** If you have more than one account and wish to use only one, please contact us [herearrow-up-right](https://developer.truecaller.com/contact) by sending : * your existing account's email id * existing app details * email id of the new account which you wish to continue using We will make sure we map your existing apps to the single account you wish to use. [PreviousGeneralchevron-left](https://docs.truecaller.com/truecaller-sdk/faqs/general) [NextAndroid App SDKchevron-right](https://docs.truecaller.com/truecaller-sdk/faqs/android-app-sdk) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Test Setup | Truecaller for Developers Quick guide on getting your test setup ready to test the common verification scenarios as described in previous sections **Pre-Requisites** * We suggest you to keep handy at-least 2 android smartphones with active SIM connections. Ensure that both the smartphones have your test app installed (Integrated with Truecaller SDK) * 2 different smartphones are required so that in case you get verified on one of the smartphones, you can use the second smartphone to check for the fresh verification scenarios. **Steps to follow for testing user scenarios :** **User State** **App Scenario** **Steps** Existing Truecaller user * Install Truecaller on smartphone 'A' * Complete profile creation step on Truecaller app * Launch your application and initiate the Truecaller verification flow * Truecaller profile consent screen should appear * Tapping on Continue button should verify the user Non Truecaller User User _getting verified for the first time_ on smartphone * Take smartphone 'A' * Uninstall Truecaller app from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs & phone permissions are asked ( if not already granted ) * Allow the permissions to enable receiving a drop call * User is manually asked to enter name ( if it's a new user on your app ) * On entering the name, SDK verifies the user Non Truecaller User User _already verified_ on the smartphone and tried to re-verify _( Please ensure that you try this step only after you have performed the above step )_ * Take smartphone 'A' * Launch your application and logout from the app * Initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone Non Truecaller User User _already verified_ on the smartphone, uninstalls and re-installs the application on the device _( Please ensure that you try this step only after you have performed the 2nd step )_ * Take smartphone 'A' * Uninstall your application from the smartphone * Launch your application and initiate the verification flow * User is asked for phone number in your application * On entering the phone number, call logs and phone permissions are asked ( if not already granted ) * User should get verified directly without any drop call being initiated and received on the smartphone circle-info _Wi-Fi or mobile internet should also be enabled on both the smartphones_ [PreviousTruecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [NextGoogle play store app permission declaration formchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/google-play-store-app-permission-declaration-form) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Clearing SDK instance | Truecaller for Developers In order to clear the resources taken up by SDK, you can use the method `TruecallerSDK.clear();` You can call this method when the activity/fragment in which you have initialised the SDK is getting killed/destroyed. For example : Copy Copy @Override protected void onDestroy() { super.onDestroy(); TruecallerSDK.clear(); } [PreviousImplement Callbackschevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/implement-callbacks) [NextHandling Error Scenarioschevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/handling-error-scenarios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Completing Verification | Truecaller for Developers Once verificationState is _TCVerificationState.otpInitiated_ and the user has entered the OTP, first name and last name(optional), you can complete the verification process by calling the following method : **Swift:** `TCTrueSDK.sharedManager().verifySecurityCode(<#OTP>, andUpdateFirstname: <#FIRST_NAME>, lastName:<#LAST_NAME>)` **Objective C** `[[TCTrueSDK sharedManager] verifySecurityCode:<#OTP> andUpdateFirstname:<#FIRST_NAME> lastName:<#LAST_NAME>];` Please note that the first name and last name values to be passed in the above method call need to follow the below mentioned rules : * The strings need to contain 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 null ) After you call the above method, your delegate method _verificationStatusChanged()_ with verification status as TCVerificationState.verificationComplete is called and the user profile is received in delegate method **Objective C:** `- (void)didReceiveTrueProfile:(nonnull TCTrueProfile *)profile` **Swift:** `func didReceive(_ profile: TCTrueProfile)` Whenever you get verification status as _TCVerificationState.verificationComplete_, SDK will share an additional access token with your application which can be accessed using the accessTokenForOTPVerification() method. 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. **Swift:** `TCTrueSDK.sharedManager().accessTokenForOTPVerification()` **Objective C :** `[[TCTrueSDK sharedManager] accessTokenForOTPVerification];` [PreviousVerifying Non-Truecaller app userschevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/verifying-non-truecaller-app-users) [NextHandling Error Scenarioschevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/handling-error-scenarios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Completing User Verification | Truecaller for Developers Once you have received the user profile details at your backend, you need to complete the verification flow at your frontend. This requires you to essentially setup a proper communication mechanism in place between your frontend client and your backend. You can implement any of the below suggested methods to achieve the same : _**Long Polling :**_ As soon as you initiate the user verification flow at your frontend and get a successful check that Truecaller is present on the device, you can make a long polling request to your backend to check if the user's profile data has reached your backend or not. This kind of request can hold until a particular threshold time so that it waits for the profile response from your server _**Periodic Polling :**_ Unlike long polling, you could also make a specific number of periodic requests \[ say every 3 seconds \] to check if your backend has received the profile response or not and accordingly stop the polling as soon as you receive the response. circle-info As a good practice, we recommend you to implement periodic polling with _5_ polling cycles at an interval of _3_ seconds each. _**WebSocket Connection :**_ With this approach, you establish a two-way, persistent connection between your client and the server to push the data back to the client as soon as the server receives the profile response. Unlike polling, this does not require the client to request or wait for the data. As soon as you receive the callback from Truecaller and fetch the user's profile, you can send the corresponding data to your frontend via the web socket connection. (In simpler terms, it's similar to a publish-subscribe system). circle-info Please note that once users click 'Continue' on the Truecaller profile dialog, the entire verification process might take a few seconds to complete. This includes the time taken for your backend to receive the access token callback and then fetch the user's profile info and then finally send it to your client. As a good practice, we recommend you to show proper wait message (and a loader) to your users so that they are aware on the progress and ensure that they don't feel stuck. For example, you may refer to some implementations [here](https://docs.truecaller.com/truecaller-for-business/) . _Also, for a scenario when a user sees the Truecaller verification screen, but doesn't takes any action before the configured timeout has elapsed, your implementation may treat this UX behaviour in the same way as you would treat the absence of Truecaller app on the device, and invoke an alternate custom flow._ [PreviousFetch User Profilechevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/fetch-user-profile) [NextHandling Error Scenarioschevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/handling-error-scenarios) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # App Configuration | Truecaller for Developers Search for “_Truecaller Number Verification_” app on [Shopify app storearrow-up-right](https://apps.shopify.com/) and install it. Proceed by allowing access for app installation You’ll be taken to the app configuration screen where you need to input your “partner key” ( generated in above steps ) and also select the options on how you want to customise the Truecaller verification dialog for your users. You can know more about all the possible customisation options in our documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/initialisation) . Please select the appropriate options as per your use case and proceed. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FJya34ZekMxzipXNOIzuV%252F11.avif%3Falt%3Dmedia%26token%3Dc0d2908a-0d6d-4d81-ac3d-cb6ca9c5a696&width=768&dpr=3&quality=100&sign=87f3cb70&sv=2) Once you save the configuration, you’ll be shown redirect links to go to your store product page and cart checkout page to add the Truecaller Number Verification app into the respective places 1) Click on “Home” in the left hand navigation panel. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FE4ZSK7atDQFISSZSkzrP%252F22.png%3Falt%3Dmedia%26token%3D4df2f18f-7d7d-401f-b158-605694ce473f&width=768&dpr=3&quality=100&sign=6a62752d&sv=2) Click on “Customise” in the theme settings section. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F2rCb1bifRvonLrJKNLkU%252F33.png%3Falt%3Dmedia%26token%3Df02a0967-2eae-4ae9-a120-4a3c7bfdc9bd&width=768&dpr=3&quality=100&sign=2fb7b7fc&sv=2) 2) Go to the “Catalog” section and click on any product to open the product customisation page Click on “Add Block” from the left hand navigation panel. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fky0Tggbkfuusa6F9u5as%252F44.png%3Falt%3Dmedia%26token%3Dab48ee93-f083-461e-9a25-cb8d141d0d13&width=768&dpr=3&quality=100&sign=32f69786&sv=2) 1. Select “Verify and Buy ( Products )” from the dropdown. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FmaSGAQd8DFPg8F17pnn8%252F55.png%3Falt%3Dmedia%26token%3De5485652-5f61-4dde-ae47-96e3d9bd6ef8&width=768&dpr=3&quality=100&sign=e8582560&sv=2) 4) Once you add the Truecaller button, you would need to disable the default dynamic checkout button for your store. To do so, click on the “Buy Buttons” option in the left hand navigation panel. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FdaUbqf5rrmWzipljDt7g%252F66.png%3Falt%3Dmedia%26token%3Ddc03ec17-07ee-4059-b952-3e419e3f6ba5&width=768&dpr=3&quality=100&sign=ccc76970&sv=2) 1. Uncheck the “Show dynamic checkout buttons” option and click on Save button and navigation to the main panel on the left hand side. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FLOYkVbRXSmIayiiMsiiu%252F77.png%3Falt%3Dmedia%26token%3D70badccc-33d5-462b-8470-10dc1fbdc030&width=768&dpr=3&quality=100&sign=99dd6ca5&sv=2) 1. Drag and position the “Verify and Buy (Products)” widget just below the “Buy Buttons” widget. Click on save. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FcnhpfRnko7cpgkgRuw3e%252F88.png%3Falt%3Dmedia%26token%3De8952afb-5b4e-49b3-b230-8cd0857475dc&width=768&dpr=3&quality=100&sign=bc902063&sv=2) 1. You can customise the CTA and text colour on the button. To do so, click on the “Verify and Buy ( Products )” and you would see the options to customise the CTA colour as well as the button text colour. Please select your desired value to match the store them. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FKQ7lyIgIx7Y7kiRYhfFA%252F99.png%3Falt%3Dmedia%26token%3D919e69f6-3ba3-4842-b852-ac99bce81959&width=768&dpr=3&quality=100&sign=bb143aa7&sv=2) 1. To enable the Truecaller flow on the cart page also, click on the link just below the “Customise your button” text in the left hand navigation panel. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FylAe1e4IfGTBYdBCNvLe%252F111.png%3Falt%3Dmedia%26token%3D1961ced3-2264-4781-b5ee-5b10e4e365c4&width=768&dpr=3&quality=100&sign=2099fdcd&sv=2) 9) Click on save _That’s it. Truecaller instant verification flow is now enabled for your online store._ [PreviousGenerating App Keychevron-left](https://docs.truecaller.com/truecaller-sdk/shopify-app/generating-app-key) [NextDeactivating App Blockchevron-right](https://docs.truecaller.com/truecaller-sdk/shopify-app/deactivating-app-block) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Release Ready | Truecaller for Developers [Testing your verification flow](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow) [Google Play App Signing](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-app-signing) [Google Play Store app permissions declaration](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-store-app-permissions-declaration) [Google Play Policy Change for Device Identifiers](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-policy-change-for-device-identifiers) [PreviousInstrumentationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/instrumentation) [NextTesting your verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Safari Redirection | Truecaller for Developers Please refer to this section in case you face issues during the app redirection from your app to Truecaller app or vice versa, during the verification flow. Truecaller SDK uses [universal linksarrow-up-right](https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1) to handle the redirection between Truecaller app and your app. The process involves 4 steps, as defined below : 1. User taps the “Sign up with Truecaller” option on your app 2. Universal link opens Truecaller app 3. User taps “Continue” button on the Truecaller verification screenD. Universal links opens your app **How Universal Links works** Associated domains are used to notify the OS that these are the universal links supported by Truecaller SDK. On tapping a URL or when the app calls openURL request, the OS will check if any of those apps have an associated domain related to the URL which is being opened. If there is one, the OS tries to check for AASA ( apple-app-site-association ) files related to the domain and if the file consists of the path, it opens the app and transfers control to the app. If any of the above is missing ( the AASA or the path), it will redirect the url to Safari. **What are associated domains** We need to host a file named AASA ( apple-app-site-association ), which has all the URLs or URL extensions, which can be used to open the app. For example: If you have your app named **"**xyz" and you need to open your app on tapping a url [https://xyz.com/registerarrow-up-right](https://xyz.com/register) , you need to host an AASA file under the url [https://xyz.com/apple-app-site-associationarrow-up-right](https://xyz.com/apple-app-site-association) . Example of a sample AASA File to open your app for URL: [https://xyz.com/registerarrow-up-right](https://xyz.com/register) ![](https://docs.truecaller.com/~gitbook/image?url=https%3A%2F%2Flh5.googleusercontent.com%2FWBWyTCR3hQ2j-oeuqdN1od-ZozzDsoFU5eB0cHNmL4hcZFi2QbOQbbKKB7Ft4bfUcvTL3n6SrOgYHPNSh2hYUl7BigqkUlS9BDBhKJJQbeJO_3kwE3i4ufB42t99Chs-Izo4rU0z&width=768&dpr=4&quality=100&sign=679f3a911bce871e33076408aefe704b126758d3af4457362a4022278973650b) We already cover the steps for creating and hosting the AASA file for you on registering your app in truecallerdevs.com. You can check if the AASA for your app is available at: YOUR\_APPLINK( provided by Truecaller )/.well-known/apple-app-site-association It should look like: [https://si44524554ef8e45b5aa83ced4e96d5xxx.truecallerdevs.com/.well-known/apple-app-site-associationarrow-up-right](https://si44524554ef8e45b5aa83ced4e96d5xxx.truecallerdevs.com/.well-known/apple-app-site-association) _P.S : change the italic part to your app link._ **How is the OS is notified about Associated Domains** Apple documentation on associated domains can be found [herearrow-up-right](https://developer.apple.com/documentation/safariservices/supporting_associated_domains) . Once you enable the associated domain capability for your app id, you can add associated domains entitlements with the necessary app links and web credentials. This is one of the steps in Truecaller SDK integration. ![](https://docs.truecaller.com/~gitbook/image?url=https%3A%2F%2Flh5.googleusercontent.com%2FWi4BOg0hCtzauIxy66saykRRPe9Fyn5qf0l4V0zkUpPsaW7uyF_RtR4_Ou4a_FfNh_zOBNcxL-SDMYZyWt6Jps-Baa_caVnDLxJIXOoCoaEV08h6Eoes_RMhrpj71ywyxQ9ReqiL&width=768&dpr=4&quality=100&sign=6c5e9c9c5d7fb415008ac806abc0db108ed5465c0b1f7839c8850cde0973f021) The OS on first installation of your app will try hitting these URLs for ./well-known/apple-app-site-association endpoints and if there is a file at the endpoint, it is downloaded to the OS. If the file is downloaded without any error, all the urls you specified will take the user to the app and if not, you will be redirected to Safari browser as if trying to open a normal URL. If there is an error in downloading the AASA file, we as the SDK or your app will not be manually able to download the file and hence it will keep on redirecting to safari. There is a three hour window of retry for AASA files depending on different status codes, that is the OS will retry downloading the AASA file after 3 hours and if it succeeds, all the redirections to your app works properly. **What to do if you face the safari redirection issue while testing the Truecaller iOS SDK integration with your app ?** If you encounter the safari redirection issue while integrating the Truecaller SDK with your iOS app, that probably means there’s some issue in downloading the AASA file for either your application or for the Truecaller app on your device. In such a scenario, you should try uninstalling and reinstalling your app build as well as Truecaller app from the device you are testing on, and re-try the flow after sometime. Usually, it may take a few hours ( as mentioned in the above section ) for the retry mechanism to kick in and download the updated AASA file on the device. Once that is successful, the flow should work absolutely fine. [PreviousHandling Error Scenarioschevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/handling-error-scenarios) [NextServer Side Response Validationchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/server-side-response-validation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Server Side Validation | Truecaller for Developers Once the SDK shares the _accessToken_ for any user verified via drop call based verification flow, you can verify the authenticity of the access token by making API call from your server to Truecaller's server. The following endpoint will return phone number and country code for the given access token. **API Endpoint:** Copy "https://sdk-otp-verification-noneu.truecaller.com/v1/otp/client/installation/phoneNumberDetail/{accessToken}" **REQUEST :** **Method :** GET **Header Parameters:** **Parameter Name** **Required** **Description** **Example** clientId yes Client ID zHTqS70ca9d3e016946f19a65b01dRR5e56460 **Request Path Parameters:** **Parameter Name** **Required** **Description** **Example** accessToken yes token granted for the partner for the respective user number that initiated login "71d8367e-39f7-4de5-a3a3-2066431b9ca8" **RESPONSE:** * 200 OK - _If access token is valid_ Copy { "phoneNumber":919999XXXXX9 "countryCode":"IN" } * 404 Not Found - _If your credentials are not valid_ Copy { "code":404 "message":"Invalid partner credentials." } * 404 Not Found - _If access token is invalid_ * 500 Internal Error - _for any other internal error_ [PreviousTrueExceptionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification/trueexception) [NextInstrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/instrumentation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy { "code":1404 "message":"Invalid access token." } Copy { "code":500 "message":"error message" } sun-brightdesktopmoon --- # Mobile Web SDK | Truecaller for Developers circle-info **“Mobile Web SDK is currently supported only for browsers running on Android OS”** **How does Truecaller SDK work for mobile websites and interfaces ?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/implementing-user-flow-for-your-mobile-website) . **Where can I find the technical documentation for integration on my mobile web app / PWA ?** Please refer to the technical documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website) . **What is the right way / How do I implement the user flow in my app using Truecaller SDK ?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/implementing-user-flow-for-your-mobile-website) . **How much time does it take for Truecaller to send the access token callback once a user approves the verification request ?** * As soon as a user clicks ‘Continue’ on the Truecaller profile dialog, our backend makes a POST request to the callback URL configured by you while creating the app from your developer account * In case users deny sharing their information, we immediately send you an error response on the same callback URL * The entire process normally takes a few milliseconds **What should I do once I receive user’s access token on my callback endpoint ?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/fetch-user-profile) **I am unable to add the callback URL to my developer account** The callback URL you add has to be an ‘https’ endpoint, and you won’t be able to add an ‘http’ endpoint. Please ensure that you have SSL setup before adding the callback URL For guidelines on properly setting up your callback URL, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/generating-app-key) . **What is request ID parameter in the deep link schema ?** Request ID corresponds to a unique identifier that you can set from your end while initiating any verification request. Once users give their consent for sharing the profile information with your mobile web app, we share the same request ID to you along with the access token on your callback URL. This can be used as a request correlation for mapping. The request ID parameter needs to be a URL safe string with a length of minimum 8 characters and a maximum of 64 characters [PreviousAndroid OAuth SDKchevron-left](https://docs.truecaller.com/truecaller-sdk/faqs/android-oauth-sdk) [NextNumber Verification Pluginchevron-right](https://docs.truecaller.com/truecaller-sdk/faqs/number-verification-plugin) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Testing your verification flow | Truecaller for Developers [Truecaller user verification flow](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [Non-Truecaller User Verification Flow](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) [Test Setup](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/test-setup) [PreviousGetting Release Readychevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready) [NextTruecaller user verification flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetching User Profile | Truecaller for Developers Make a network call to fetch the userInfo using access token from step 14. The response would be corresponding to the scopes granted by the user. `GET` `https://oauth-account-noneu.truecaller.com/v1/userinfo` **Headers** Name Type Description Authorization\* "Bearer " Insert access token from the previous step - fetching user token 200: OK { “sub”: “13627101294235520", “given\_name”: “xyz”, “family\_name”: “xyz”, “phone\_number”: “91xxxxxxxxxx", “email”: “[\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) ”, “picture”: “https://www.truecaller.com/xyz”, “gender”: “male/female”, “phone\_number\_country\_code”: “IN”, “phone\_number\_verified”: true, ˇ“address”: { “locality”: “Bangalore”, “postal\_code”: “5xxxxx" } } 401: Unauthorized If authentication type is not bearer token 404: Not Found Profile information is not present for the user 500: Internal Server Error Failed to validate token due to server error 401: Unauthorized Token in invalid/ expired 422: Unprocessable Entity openid scope missing in initial request 500: Internal Server Error Unexpected error at server side **Sample cURL request :** Copy curl --location --request GET 'https://oauth-account-noneu.truecaller.com/v1/userinfo' \ --header 'Authorization: Bearer testtoken' [PreviousFetching User Tokenchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-token) [NextNon Truecaller User Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # TrueException | Truecaller for Developers Error Code Error Message Description 4 "Desired permissions are missing" When the requisite permissions are missing or not granted while making the verification request 6 “Sim state is not ready” When the SIM state on the device is not ready 7 “Airplane mode is ON” When the device is on airplane mode, hence causing missed call to not go through 2 "Phone number limit reached” When the used mobile number has exceeded the maximum number of allowed verification attempts within a span of 24 hours from the time the first verification attempt was made 2 “Request id limit reached” When the used device exceeds the maximum number of allowed verification attempts in a span of 24h 2 “Invalid partner credentials. When the partner key ( app key ) you have configured in your project is incorrect. Visit [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/generating-client-id) for more info 2 “Something went wrong: Failed to create installation.” In case of Truecaller internal service error 2 “Invalid phone number” When the input mobile number is not a valid mobile number 2 “Profile has not been created yet” When the user has been successfully verified, but for some reason their profile is not created which could be due to incorrect profile data while creating TrueProfile() in verifyMissedCall method or due to network issues 5 “Invalid Name” When the string entered in the profile builder method doesn’t follow the validation checks : { min 1 char, max 128, at least 1 alphabet required with optional numeric and special chars, cannot be all numeric or all special characters, but can be all alphabets } Refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/completing-verification) for more info [PreviousCompleting Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification/completing-verification) [NextServer Side Validationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification/server-side-validation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Fetch User Profile | Truecaller for Developers Once the user approves the verification on your app with their Truecaller profile ( by clicking the 'Continue' button on the dialog ), we will immediately post the user's accessToken and the requestID to your Callback endpoint. The sample response format would look like below : Copy {"requestId":"RL8YZ41FQMt5Jiak2sc_Ys0OgQA=","accessToken":"a1asX--8_yw-OF--E6Gj_DPyKelJIGUUeYB9U9MJhyeu4hOCbrl","endpoint":"https://profile4-noneu.truecaller.com/v1/default"} Here, the request ID is the same string which you had earlier passed on in the deep link '_requestNonce_' parameter. This parameter acts as a request-response correlation identifier and can be used by you to identify the correct source of the request. Once you receive the user's access token at your backend, you can fetch the respective user profile by making an API call to the endpoint that you receive in the above response in the following format : **Header Authorisation Parameters:** **Parameter \[Type\]** **Required** **Description** **Example** Authorization yes Bearer {token} Bearer WcB~aSJYbCr5yla5z0CdAGfyj3Rruk~8 **Get User Profile** Copy curl -X GET -H "Authorization: Bearer a3sAB0KnGANg4VZwIXfhUyFmPbzoONofl4FjIItac0JQSODp6niW8oBr33uOI-u7" -H "Cache-Control: no-cache" "https://profile4-noneu.truecaller.com/v1/default" **Sample User Profile Response** Copy { "phoneNumbers": ["919999999999"], "addresses": [\ {\ "countryCode": "in",\ "city": "city_field_value",\ "street": "street_field_value",\ "zipcode": "1234567"\ }\ ], "avatarUrl": "https://s3-eu-west-1.amazonaws.com/images1.truecaller.com/myview/1/15a999e9806gh73834c87aaa0498020d/3", "aboutMe":"About me", "jobTitle": "CEO", "companyName": "ABC", "history": { "name": { "updateTime": "1508089888000" } }, "isActive": "True", "gender": "Male", "createdTime": "1379314068000", "onlineIdentities": { "url": "https://www.truecaller.com", "email": "[email protected]", "facebookId":"105056625245", }, "type": "Personal", "id": "655574719", "userId":"1319413476", "badges": ["verified", "premium"], "name": { "last": "Kapoor", "first": "Rajat" } } circle-info Please note that the optional attributes in the user profile as defined above, wouldn't exist in the response if not updated by user **Response Codes** * 200 OK * 401 Unauthorised - **If your credentials are not valid** * 5xx Server error - **Any other error** Please note, in case users do not wish to share their Truecaller profile ( by dismissing Truecaller profile dialog ), you'll receive a user reject error response on your callback endpoint. The sample format for the same would look as below **:** [PreviousInvoking verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/invoking-verification) [NextCompleting User Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/completing-user-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy {"requestId":"WZqlS6PqY0ycO3mKlEuI=","status":"user_rejected"} sun-brightdesktopmoon --- # Google Play Policy Change for Device Identifiers | Truecaller for Developers Truecaller SDK versions lower than v2.7.0 use device ID and SIM serial identifiers for the non-Truecaller user verification flow ( drop call based verification ). With the v2.7.0 release, we have removed dependency on these attributes. As per the recent Google play store app policy changes, apps shouldn’t use these identifiers in conjunction with the phone number. Google Play sends your app a warning in case your app ( including any integrated 3rd party libraries ) is using these identifiers. **If you are using Truecaller SDK version less than v2.7.0, we recommend you to update the same to 2.70 and above. Once you upgrade the SDK version, the above mentioned issue around play store publishing would be resolved.** The latest SDK version is completely in line to google play’s new data privacy policies and hence has been listed on the google play SDK index as well. Only policy compliant SDKs are listed on the SDK index. [![Logo](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2Fwww.gstatic.com%2Fplay-sdk-console%2Ficons%2Ffavicon_32dp.png&width=20&dpr=3&quality=100&sign=3ef87f1f&sv=2)Google Play SDK Indexplay.google.comchevron-right](https://play.google.com/sdks/details/com-truecaller-android-sdk-truecaller-sdk) circle-info _Note_ : For the primary 1-tap flow to function via the Truecaller SDK, users need to have the Truecaller app installed and logged in on their devices. As the Truecaller app is supported only for android API level 22 (Android 5.1) and above, the SDK has also been upgraded to support the same. For you to upgrade to the latest SDK version, you may refer to the change log [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/changelog) . [PreviousGoogle Play Store app permissions declarationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-store-app-permissions-declaration) [NextChangelogchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/changelog) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Instrumentation | Truecaller for Developers **Quick guide on how to properly track and instrument funnel for the verification flow of users via Truecaller on your app:** For proper tracking of the verification funnel via Truecaller SDK on your app, we recommend you to implement tracking events for the following states : **When you are using the SDK for verification of Truecaller users only ( 1-tap Verification without OTP ) :** 1. Total users coming to your verification flow 2. Number of cases when the Truecaller app is present on your smartphone 3. Number of profile verification requests made by your app ( when _TruecallerSDK.getInstance().getUserProfile() method is invoked_ ) 4. Number of users who proceed with this flow and click Continue on the Truecaller dialog \[ for these cases, you receive a success callback with TrueProfile response in _onSuccessProfileShared()_ callback method \] 5. Number of cases where you received any error, where you receive an error callback with TrueError response in _onFailureProfileShared()_ callback method. For details on specific error codes, please refer [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/handling-error-scenarios) . **When you are using the SDK for verification of non-Truecaller users also ( via drop call / fallback OTP ) :** 1. Total users coming to your verification flow 2. Number of cases when the Truecaller app is present on your smartphone and users get verified via the Truecaller 1-tap flow ( as described in the above section ) 3. Number of verification requests made by your app for a non-Truecaller user ( when _TruecallerSDK.getInstance().requestVerification() method is invoked_ ) 4. Number of cases where the user is getting verified for the very first time on the current smartphone and you receive a success callback - _onRequestSuccess()_ method ( Please refer [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users/trueexception) ) - 1. When the callback type you receive is either _VerificationCallback.TYPE\_MISSED\_CALL\_INITIATED_ or _VerificationCallback.TYPE\_OTP\_INITIATED._ This implies that a drop call / SMS has been triggered to the user's mobile number. 2. When the callback type you receive is either _VerificationCallback.TYPE\_MISSED\_CALL\_RECEIVED_ or _VerificationCallback.TYPE\_OTP\_RECEIVED._ This implies that a drop call / SMS has been received on the user's mobile number on that smartphone. Please note that for getting the TYPE\_OTP\_RECEIVED callback, your app needs to have the Google SMS retriever hash code configured on Truecaller's developer portal ( while creating your partner key ) so that the SDK can auto read the incoming SMS and share the OTP with you in this particular callback method. 3. Further to the above step, when you complete the user verification by invoking either _TruecallerSDK.getInstance().verifyOtp()_ or _TruecallerSDK.getInstance().verifyMissedCall()_ corresponding to the verification medium being used 4. When the callback type you receive is either _VerificationCallback.TYPE\_VERIFICATION\_COMPLETE._ This implies that the verification in complete for the user 5. Number of cases where the user is already verified previously on the current smartphone and gets verified directly. In such cases, you receive the success callback - _onRequestSuccess()_ method with callback type as _VerificationCallback.TYPE\_PROFILE\_VERIFIED\_BEFORE_ [PreviousFor Non-Truecaller users verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-non-truecaller-users-verification-flow) [NextGetting Release Readychevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Swift | Truecaller for Developers 1\. Import the TruecallerSDK framework in the class where you want to initialize it (for example AppDelegate) and in the class that you want to receive the profile response. Usually, this will be the ViewController responsible for displaying the True Profile info. Swift 2.3 : Copy import TrueSDK Swift 3+ : Copy import TrueSDK 2\. Check if the current device supports the use of TruecallerSDK and (if so) setup TruecallerSDK. We recommend this to be done in the application:didFinishLaunchingWithOptions: Swift 2.3 : Copy //Setup TruecallerSDK if TCTrueSDK.sharedManager().isSupported() { TCTrueSDK.sharedManager().setupWithAppKey(<#YOUR_APP_KEY#>, appLink: <#YOUR_APP_LINK#>) } Swift 3+ : Copy //Setup TruecallerSDK if TCTrueSDK.sharedManager().isSupported() { TCTrueSDK.sharedManager().setup(withAppKey: <#YOUR_APP_KEY#>, appLink: <#YOUR_APP_LINK#>) } Use the entire associated domain link provided by Truecaller for YOUR\_APP\_LINK. For example: `https://si44524554ef8e45b5aa83ced4e96d5xxx.truecallerdevs.com` (including https://). circle-info **Important:** Make sure you type the YOUR\_APP\_KEY and YOUR\_APP\_LINK fields correctly. If you mistype the YOUR\_APP\_LINK field, the permission screen in Truecaller will be shown and immediatelly dismissed. In this case, the SDK will not be able to send a corresponding error back to your app. 3\. In AppDelegate implement the method application(application: continue userActivity: restorationHandler:) -> Bool and call the corresponding method of TCTrueSDK.sharedManager(). If the method returns false that means the activity need not be addressed by TruecallerSDK and you can handle it as desired. Swift 2.3 : Swift 3+ : Swift 5 : For apps using SceneDelegate instead of AppDelegate : 4\. Set the class where you want to receive TruecallerSDK events (the profile or errors) a TCTrueSDKDelegate Swift 2.3 : Swift 3+ : 5\. Implement the two TCTrueSDKDelegate methods Swift 2.3 : Swift 3+ : The profile object is of type TCTrueProfile (written in Objective C) which offers the following user data: 6\. Set the delegate property of the TCTrueSDK.sharedManager(). Make sure you do this before you request the True Profile. Swift 2.3 : Swift 3+ : 7\. Requesting the True Profile data can be done automatically or manually (either in code or in the Interface Builder): _a._ The TCProfileRequestButton does the True Profile Request automatically. To use the predefined buttons you need to **set the Button Type to Custom** and set auto-layout constraints for the button. You can then choose the True button style and corners style of the button in code or in Interface Builder using TCProfileRequestButton property buttonStyle and buttonCornersStyle: Swift 2.3 : Swift 3+ : _b._ If you prefer to do it yourself, you can use the method requestTrueProfile. Swift 2.3 : Swift 3+ : circle-info **Important:** Do not use both approaches a. and b. at the same time. Doing so will request the Truecaller profile 2 times in a row. You do not need to call requestTrueProfile if you use TCProfileRequestButton. This button includes the request in itself. [PreviousUsagechevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage) [NextObjective-Cchevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage/objective-c) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool { return TCTrueSDK.sharedManager().application(application, continueUserActivity: userActivity, restorationHandler: restorationHandler) } Copy func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Swift.Void) -> Bool { return TCTrueSDK.sharedManager().application(application, continue: userActivity, restorationHandler: restorationHandler) } Copy func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { return TCTrueSDK.sharedManager().application(application, continue: userActivity, restorationHandler: restorationHandler as? ([Any]?) -> Void) } Copy func scene(_ scene: UIScene, continue userActivity: NSUserActivity) { TCTrueSDK.sharedManager().scene(scene, continue: userActivity) } Copy class HostViewController: UIViewController, TCTrueSDKDelegate { Copy class HostViewController: UIViewController, TCTrueSDKDelegate { Copy func didFailToReceiveTrueProfileWithError(error: TCError) { //Custom code here } func didReceiveTrueProfile(profile: TCTrueProfile) { //Custom code here } Copy func didFailToReceiveTrueProfileWithError(_ error: TCError) { //Custom code here } func didReceive(_ profile: TCTrueProfile) { //Custom code here } Copy typedef NS_ENUM(NSUInteger, TCTrueSDKGender) { TCTrueSDKGenderNotSpecified = 0, // TCTrueSDKGenderMale, // TCTrueSDKGenderFemale, // }; /*! * @class TCTrueProfile * @brief The True Profile info returned. */ @interface TCTrueProfile : NSObject /*! @property firstName @brief User's first name */ @property (nonatomic, strong, nullable, readonly) NSString *firstName; /*! @property lastName @brief User's last name */ @property (nonatomic, strong, nullable, readonly) NSString *lastName; /*! @property phoneNumber @brief User's phone number */ @property (nonatomic, strong, nullable, readonly) NSString *phoneNumber; /*! @property countryCode @brief User's country code */ @property (nonatomic, strong, nullable, readonly) NSString *countryCode; /*! @property street @brief User's street address */ @property (nonatomic, strong, nullable, readonly) NSString *street; /*! @property city @brief User's city */ @property (nonatomic, strong, nullable, readonly) NSString *city; /*! @property zipCode @brief User's zip code */ @property (nonatomic, strong, nullable, readonly) NSString *zipCode; /*! @property facebookID @brief User's facebook id */ @property (nonatomic, strong, nullable, readonly) NSString *facebookID; /*! @property twitterID @brief User's twitter id */ @property (nonatomic, strong, nullable, readonly) NSString *twitterID; /*! @property email @brief User's email */ @property (nonatomic, strong, nullable, readonly) NSString *email; /*! @property url @brief User's Truecaller profile url */ @property (nonatomic, strong, nullable, readonly) NSString *url; /*! @property avatarURL @brief User's avatar url */ @property (nonatomic, strong, nullable, readonly) NSString *avatarURL; /*! @property jobTitle @brief User's job title */ @property (nonatomic, strong, nullable, readonly) NSString *jobTitle; /*! @property companyName @brief User's company name */ @property (nonatomic, strong, nullable, readonly) NSString *companyName; /*! @property gender @brief User's gender */ @property (nonatomic, assign, readonly) TCTrueSDKGender gender; /*! @property isVerified @brief User's account special verification status */ @property (nonatomic, assign, readonly) BOOL isVerified; /*! @property isAmbassador @brief Is the user a Truecaller ambasador */ @property (nonatomic, assign, readonly) BOOL isAmbassador; Copy TCTrueSDK.sharedManager().delegate = self Copy TCTrueSDK.sharedManager().delegate = self Copy self.button.buttonStyle = TCButtonStyleBlue self.button.buttonCornersStyle = TCButtonCornersStyleRounded Copy self.button.buttonStyle = TCButtonStyle.blue.rawValue self.button.buttonCornersStyle = TCButtonCornersStyle.rounded.rawValue Copy TCTrueSDK.sharedManager().requestTrueProfile() Copy TCTrueSDK.sharedManager().requestTrueProfile() sun-brightdesktopmoon --- # Google Play App Signing | Truecaller for Developers In case you are using the app signing feature of google play store, when you upload your release build to the google play store, it assigns a new SHA1 fingerprint to your app - which might lead to UNAUTHORISED\_PARTNER\_KEY error for your app, since the appKey used by you in your app config was generated for a different SHA1, and hence won't work for the new SHA1. In this scenario, you need to go to the "app integrity section" of the Google play console, where you would see 2 SHA1 keys (a) Upload Certificate SHA1 and (b) App Signing Certificate SHA1. You need to note down the "App Signing Certificate SHA1" from the console, and generate a new Truecaller partner key ( app key ) for your play store build. Configure this key for your play store build in your project, and upload the build on play store for your users. [PreviousTest Setupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/test-setup) [NextGoogle Play Store app permissions declarationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-store-app-permissions-declaration) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # App Key Configuration | Truecaller for Developers 4\. Open your strings.xml file. Example path: /app/src/main/res/values/strings.xml and add a new string with the name "partnerKey" and value as your "appKey" 5\. Open your AndroidManifest.xml and add a meta-data element to the application element Copy Copy ... ... [PreviousSetupchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/setup) [NextInitialisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/initialisation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Setup | Truecaller for Developers 1\. Ensure that your Minimum SDK version is at least API level 22 or above ( Android 5.1 ). In case your android project compiles for API level below 22, you can include the following line in your AndroidManifest.xml file to avoid any compilation issues : Copy Copy Using this would ensure that the sdk works normally for API level 22 & above, and would be disabled for API level < 22 Please make sure that you put the necessary API level checks before accessing the SDK methods in case compiling for API level < 22 2\. Add the following dependency in your app level **build.gradle** file : Copy Copy dependencies { ... implementation "com.truecaller.android.sdk:truecaller-sdk:2.8.0" } Also, add the following lines of code in your gradle file, if not already present Copy Copy android{ compileOptions{ sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } Add _mavenCentral_() in your project level **build.gradle** file : Copy circle-info _Please note that Truecaller SDK already contains consumer proguard rules,_ _so it will be appended automatically to your app's proguard rules_ _and you do not need to have any additional proguard rules to be added for the SDK to function._ [PreviousIntegrating with your Appchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app) [NextApp Key Configurationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/app-key-configuration) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy allprojects{ repositories{ ... mavenCentral() ... } } sun-brightdesktopmoon --- # Google Play Store app permissions declaration | Truecaller for Developers This section is only relevant for apps who are using the Truecaller SDK for verifying non-Truecaller user as well and seek phone permissions from the users If you are using the functionality of verifying non Truecaller users also via the SDK, your app would need specific phone permissions as has been described in this [section](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users) . If you are using the Truecaller SDK for verification of existing Truecaller users only ( 1-tap flow ), you can skip this section. As you upload the new app build to PlayStore with user verification feature via Truecaller SDK and the requisite permissions, you might be asked to fill an app permission declaration form. We are sharing some tips on how to appropriately justify the need for these permissions for your verification flow : **#1: In one sentence, please describe the core functionality of your app.** To be defined by you as a publisher of your app **#2: What is the core functionality in your app requiring the Call Log and / or SMS permissions?** Mobile number verification to onboard users on This is in-line with Google’s allowed usage of this permission for account verification via phone call, as stated here: https://support.google.com/googleplay/android-developer/answer/9047303 Flow: a)Enter mobile number b)Request READ\_CALL\_LOG permission c)Initiate drop call from 3rd party service to respective number d)Drop call hits user’s device and is rejected automatically via above permission to complete verification **#3: Do any of the following disallowed use cases apply to your app’s core functionality request for Call Log or SMS permissions?** NO **#4: Do any of the following other use cases apply to your app’s core functionality request for Call Log or SMS permissions?** OTP & Account verification via Phone Call (select this from the given list of options) **#5: Is your app’s use of Call Log or SMS permissions to provide functionality required by law or regulation?** No **#6: Other** We use drop call based verification of users’ mobile number for account creation or logging into their accounts. Such method of mobile number verification results in better verification success rates in our key markets like India, etc. _Android guidelines for asking app permissions from user_ [https://developer.android.com/training/permissions/requestingarrow-up-right](https://developer.android.com/training/permissions/requesting) [PreviousGoogle Play App Signingchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-app-signing) [NextGoogle Play Policy Change for Device Identifierschevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-policy-change-for-device-identifiers) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Truecaller user verification flow | Truecaller for Developers **Common scenarios to check for in you app verification flow for existing Truecaller users:** **Truecaller app present and registration completed on Truecaller app** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should see the Truecaller profile dialog. Click on continue to complete the verification flow and ensure that the verification is completed. **Truecaller app present but registration not completed on Truecaller app** Ensure that the Truecaller app is present on your device but you have _not_ completed the profile creation step on Truecaller app. Open your app and initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog, and you would receive the control in onFailureProfileShared() with the specific error code. **Truecaller app not present on the device** Remove the Truecaller app from your device. Open your app and try to initiate the Truecaller verification flow. The user should not see the Truecaller profile dialog and should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. **Network not available on device** Ensure that the Truecaller app is present on your device and you have completed the profile creation step on Truecaller app. Turn off the mobile data and WiFi on your device. Open your app and initiate the Truecaller verification flow. You would see the Truecaller profile dialog. Click on continue button on the dialog, you would receive control in onFailureProfileShared() method with a specific error code. **Partner key should be working fine ( onFailureProfileShared() Error Type 3 )** For complete details on this part, please refer [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/generating-app-key) **User wishes to proceed with another number OR does not want to share their Truecaller profile** Initiate the Truecaller verification flow in your app to invoke the Truecaller profile dialog. Click on _system back_ or _Use another mobile number_ button on the dialog to dismiss the dialog. In such a scenario, user should be taken to either your alternate verification flow or in case you are using Truecaller SDK's functionality of verifying non-Truecaller users, user should be redirected to that flow. We also recommend that you go through the [FAQ section](https://docs.truecaller.com/truecaller-sdk/faqs/android-app-sdk) to go through some of the commonly asked questions [PreviousTesting your verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow) [NextNon-Truecaller User Verification Flowchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/non-truecaller-user-verification-flow) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Integrating with your App | Truecaller for Developers Truecaller SDK does not require any additional app permissions if you are using the SDK for verification of only Truecaller users. To enable verification flow for non-Truecaller users as well, the SDK needs specific android permissions to enable the drop call based background verification flow. For details, please refer [here.](https://docs.truecaller.com/truecaller-for-business/) circle-info **If you haven't already completed** [**User flow implementation guide**](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/implementing-user-flow-for-your-app) **for your app, we recommend you to complete that first before proceeding with the integration and also refer to the** [**user scenarios for verification guide**](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) **.** [PreviousGenerating App Keychevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/generating-app-key) [NextSetupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Advanced Steps | Truecaller for Developers **Advanced steps for validating the request-response correlation:** Every request sent via a Truecaller app that supports Truecaller SDK has a unique identifier. This identifier is bundled into the response for assuring a correlation between a request and a response. If you want you can check this correlation yourself by: 1\. You can use your own custom request identifier via the TrueClient with `TruecallerSDK.getInstance().setRequestNonce(customHash);` Note : The customHash must be a base64 URL safe string with a minimum character length of 8 and maximum of 64 characters 2\. In `ITrueCallback.onSuccesProfileShared(TrueProfile)` verify that the previously generated identifier matches the one in TrueProfile.requestNonce. IMPORTANT: Truecaller SDK already verifies the request-response correlation before forwarding it to the your app. [PreviousCompleting Verificationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users/completing-verification) [NextServer Side Response Validationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Objective-C | Truecaller for Developers 1\. Import the TruecallerSDK framework in the class where you want to initialize it (for example AppDelegate) and in the class that you want to receive the profile response. Usually, this will be the ViewController responsible for displaying the True Profile info. Copy #import 2\. Check if the current device supports the use of TruecallerSDK and (if so) setup TruecallerSDK. We recommend this to be done in the application:didFinishLaunchingWithOptions: Copy if ([[TCTrueSDK sharedManager] isSupported]) { [[TCTrueSDK sharedManager] setupWithAppKey:<#YOUR_APP_KEY#> appLink:<#YOUR_APP_LINK#>]; } Use the entire associated domain link provided by Truecaller for YOUR\_APP\_LINK. For example: `https://si44524554ef8e45b5aa83ced4e96d5xxx.truecallerdevs.com` (including https://). circle-info **Important:** Make sure you type the YOUR\_APP\_KEY and YOUR\_APP\_LINK fields correctly. If you mistype the YOUR\_APP\_LINK field, the permission screen in Truecaller will be shown and immediatelly dismissed. In this case, the SDK will not be able to send a corresponding error back to your app. 3\. In AppDelegate implement the method application:continueUserActivity:restorationHandler: and call the corresponding method of the \[TCTrueSDK sharedManager\]. If the method returns false that means the activity need not be addressed by TruecallerSDK and you can handle it as desired. Copy - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler { return [[TCTrueSDK sharedManager] application:application continueUserActivity:userActivity restorationHandler:restorationHandler]; } 4\. Set the class where you want to receive TruecallerSDK events (the profile or errors) a TCTrueSDKDelegate Copy #import #import @interface ViewController : UIViewController @end 5\. Implement the two TCTrueSDKDelegate methods The profile object is of type TCTrueProfile (written in Objective C) which offers the following user data: 6\. Set the delegate property of the \[TCTrueSDK sharedManager\]. Make sure you do this before you request the True Profile. 7\. Requesting the True Profile data can be done automatically or manually (either in code or in the Interface Builder): _a._ The TCProfileRequestButton does the True Profile Request automatically. To use the predefined buttons you need to **set the Button Type to Custom** and set auto-layout constraints for the button. You can then choose the True button style and corners style of the button in code or in Interface Builder using TCProfileRequestButton property buttonStyle and buttonCornersStyle: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FoKiO3A2AvOLgOqdOOW9t%252Fimage%2520%2825%29.png%3Falt%3Dmedia%26token%3Dd23e2a98-7940-4466-9282-e032f2e9c8d1&width=768&dpr=3&quality=100&sign=55f37258&sv=2) _b._ If you prefer to do it yourself, you can use the method requestTrueProfile. circle-info **Important:** Do not use both approaches a. and b. at the same time. Doing so will request the Truecaller profile 2 times in a row. You do not need to call requestTrueProfile if you use TCProfileRequestButton. This button includes the request in itself. [PreviousSwiftchevron-left](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/usage/swift) [NextVerifying Non-Truecaller app userschevron-right](https://docs.truecaller.com/truecaller-sdk/ios/integrating-with-your-ios-app/verifying-non-truecaller-app-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy - (void)didReceiveTrueProfile:(nonnull TCTrueProfile *)profile { //Custom code } - (void)didFailToReceiveTrueProfileWithError:(nonnull TCError *)error { //Custom code } Copy typedef NS_ENUM(NSUInteger, TCTrueSDKGender) { TCTrueSDKGenderNotSpecified = 0, // TCTrueSDKGenderMale, // TCTrueSDKGenderFemale, // }; /*! * @class TCTrueProfile * @brief The True Profile info returned. */ @interface TCTrueProfile : NSObject /*! @property firstName @brief User's first name */ @property (nonatomic, strong, nullable, readonly) NSString *firstName; /*! @property lastName @brief User's last name */ @property (nonatomic, strong, nullable, readonly) NSString *lastName; /*! @property phoneNumber @brief User's phone number */ @property (nonatomic, strong, nullable, readonly) NSString *phoneNumber; /*! @property countryCode @brief User's country code */ @property (nonatomic, strong, nullable, readonly) NSString *countryCode; /*! @property street @brief User's street address */ @property (nonatomic, strong, nullable, readonly) NSString *street; /*! @property city @brief User's city */ @property (nonatomic, strong, nullable, readonly) NSString *city; /*! @property zipCode @brief User's zip code */ @property (nonatomic, strong, nullable, readonly) NSString *zipCode; /*! @property facebookID @brief User's facebook id */ @property (nonatomic, strong, nullable, readonly) NSString *facebookID; /*! @property twitterID @brief User's twitter id */ @property (nonatomic, strong, nullable, readonly) NSString *twitterID; /*! @property email @brief User's email */ @property (nonatomic, strong, nullable, readonly) NSString *email; /*! @property url @brief User's Truecaller profile url */ @property (nonatomic, strong, nullable, readonly) NSString *url; /*! @property avatarURL @brief User's avatar url */ @property (nonatomic, strong, nullable, readonly) NSString *avatarURL; /*! @property jobTitle @brief User's job title */ @property (nonatomic, strong, nullable, readonly) NSString *jobTitle; /*! @property companyName @brief User's company name */ @property (nonatomic, strong, nullable, readonly) NSString *companyName; /*! @property gender @brief User's gender */ @property (nonatomic, assign, readonly) TCTrueSDKGender gender; /*! @property isVerified @brief User's account special verification status */ @property (nonatomic, assign, readonly) BOOL isVerified; /*! @property isAmbassador @brief Is the user a Truecaller ambasador */ @property (nonatomic, assign, readonly) BOOL isAmbassador; Copy [TCTrueSDK sharedManager].delegate = self; Copy self.button.buttonStyle = TCButtonStyleBlue; self.button.buttonCornersStyle = TCButtonCornersStyleRounded; Copy [[TCTrueSDK sharedManager] requestTrueProfile]; sun-brightdesktopmoon --- # Non-Truecaller User Verification Flow | Truecaller for Developers **Common scenarios to check for in you app verification flow for non-Truecaller users** If the user does not have the Truecaller app present on their device or they chose to verify using a different number than the one already verified on Truecaller app currently, they can be taken to this flow in which we provision the verification of the user by sending missed call using our infrastructure. **User verifying via Truecaller's missed call mechanism for the very first time** Proceed to the flow where the user needs to input their mobile number. Give the necessary permissions ( as described [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app/verifying-non-truecaller-users) ) and proceed with the verification. You would receive a missed call on the device which gets automatically detected by the SDK. Post this, you need to pass the user's first name and last name to the SDK to complete the verification **User verifying via OTP mechanism ( if users deny phone permissions, as described** [**here**](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users) **)** In case the user denies the needed permission in the above step, the means of verification would fallback to SMS based OTP instead of missed call. In that case, you can chose to implement your own fallback OTP infrastructure or opt for Truecaller's fallback SMS based OTP infrastructure. If you have opted for your own SMS infrastructure, you can chose to proceed as per your own flow. In case you have opted for Truecaller's SMS based OTP infrastructure, when you request for a verification for the user's number, Truecaller sends an SMS to the user containing the OTP. Once the OTP is keyed in by the user or automatically read ( using the SDKs SMS retriever functionality ), you need to pass the user's first name and last name along with the OTP to the Truecaller SDK method to complete the verification flow. **User already verified with the same credentials previously on the smartphone** Once a user's verification is completed successfully on a particular device, and they re-attempt to verify on the same app using the same credentials ( same smartphone, same mobile number ), Truecaller SDK is able to identify the user and we can tell you it's the same user. In this case, no additional missed call / OTP is needed to re-verify the user. The SDK will directly tell the status of the repeat user, and in this case returns the first name and last name of the user back to you in response. [PreviousTruecaller user verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/truecaller-user-verification-flow) [NextTest Setupchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/testing-your-verification-flow/test-setup) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # TrueException | Truecaller for Developers Error Code Error Message Description 4 "Desired permissions are missing" When the requisite permissions are missing or not granted while making the verification request 6 “Sim state is not ready” When the SIM state on the device is not ready 7 “Airplane mode is ON” When the device is on airplane mode, hence causing missed call to not go through 2 "Phone number limit reached” When the used mobile number has exceeded the maximum number of allowed verification attempts within a span of 24 hours from the time the first verification attempt was made 2 “Request id limit reached” When the used device exceeds the maximum number of allowed verification attempts in a span of 24h 2 “Invalid partner credentials.” When the partner key ( app key ) you have configured in your project is incorrect. Visit [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/generating-app-key) or [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-app-signing) basis the build in which you are facing the issue on 2 “Something went wrong: Failed to create installation.” In case of Truecaller internal service error 2 “Invalid phone number” When the input mobile number is not a valid mobile number 2 “Profile has not been created yet” When the user has been successfully verified, but for some reason their profile is not created which could be due to incorrect profile data while creating TrueProfile() in verifyMissedCall method or due to network issues [PreviousVerifying non Truecaller userschevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users) [NextCompleting Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users/completing-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Customisation | Truecaller for Developers Truecaller SDK provides you with capabilities to configure the following : ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Fgujy5199WXfL0C5hBhcD%252F4.webp%3Falt%3Dmedia%26token%3Df7ceae0a-1de9-43fe-8169-d233d804f25d&width=768&dpr=3&quality=100&sign=7dea3d20&sv=2) circle-info If you are already using Truecaller SDK with pop-up variant of the verification screen, you can upgrade to the bottom sheet layout by simply making changes to the configuration options in your **TruecallerSdkScope** object. Refer to the below section for details on all the customisation capabilities and the possible values you may set. Copy TruecallerSdkScope trueScope = new TruecallerSdkScope.Builder(this, sdkCallback) .consentMode(TruecallerSdkScope.CONSENT_MODE_BOTTOMSHEET) .buttonColor(Color.parseColor("<>")) .buttonTextColor(Color.parseColor("<>")) .loginTextPrefix(TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .loginTextSuffix(TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_VERIFY_MOBILE_NO) .ctaTextPrefix(TruecallerSdkScope.CTA_TEXT_PREFIX_USE) .buttonShapeOptions(TruecallerSdkScope.BUTTON_SHAPE_ROUNDED) .privacyPolicyUrl("<>") .termsOfServiceUrl("<>") .footerType(TruecallerSdkScope.FOOTER_TYPE_NONE) .consentTitleOption(TruecallerSdkScope.SDK_CONSENT_TITLE_LOG_IN) .sdkOptions(TruecallerSdkScope.SDK_OPTION_WIHTOUT_OTP) .build(); **Contextual text prefix \[** .loginTextPrefix() **\]** To provide appropriate context of verification to the Truecaller user**,** use one of the below mentioned TruecallerSdkScope values to show the corresponding message to the user. **Text to use** **TruecallerSdkScope value** To get started TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_GET\_STARTED To continue TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_CONTINUE To place order TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_PLACE\_ORDER To complete your order TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_COMPLETE\_YOUR\_PURCHASE To checkout TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_CHECKOUT To complete your booking TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_COMPLETE\_YOUR\_BOOKING To proceed with your booking TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_PROCEED\_WITH\_YOUR\_BOOKING To continue with your booking TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_CONTINUE\_WITH\_YOUR\_BOOKING To get details TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_GET\_DETAILS To view more TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_VIEW\_MORE To continue reading TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_CONTINUE\_READING To proceed TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_PROCEED For new updates TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_FOR\_NEW\_UPDATES To get updates TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_GET\_UPDATES To subscribe TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_SUBSCRIBE To subscribe and get updates TruecallerSdkScope.LOGIN\_TEXT\_PREFIX\_TO\_SUBSCRIBE\_AND\_GET\_UPDATES **Contextual text suffix \[** .loginTextSuffix() **\]** To provide appropriate context of verification to the Truecaller user and set the suffix string Suffix string **TruecallerSdkScope value** please login TruecallerSdkScope.LOGIN\_TEXT\_SUFFIX\_PLEASE\_LOGIN please signup TruecallerSdkScope.LOGIN\_TEXT\_SUFFIX\_PLEASE\_SIGNUP please login/ signup TruecallerSdkScope.LOGIN\_TEXT\_SUFFIX\_PLEASE\_LOGIN\_SIGNUP please register TruecallerSdkScope.LOGIN\_TEXT\_SUFFIX\_PLEASE\_REGISTER please sign in TruecallerSdkScope.LOGIN\_TEXT\_SUFFIX\_PLEASE\_SIGN\_IN please verify mobile number TruecallerSdkScope.LOGIN\_TEXT\_SUFFIX\_PLEASE\_VERIFY\_MOBILE\_NO **Button text options \[** .ctaTextPrefix() **\]** To set the prefix on the CTA button **Button text to use** TruecallerSdkScope value Use TruecallerSdkScope.CTA\_TEXT\_PREFIX\_USE Continue with TruecallerSdkScope.CTA\_TEXT\_PREFIX\_CONTINUE\_WITH Proceed with TruecallerSdkScope.CTA\_TEXT\_PREFIX\_PROCEED\_WITH **Button shape \[** .buttonShapeOptions() **\]** To chose the shape of the CTA button Button shape TruecallerSdkScope value Round TruecallerSdkScope.BUTTON\_SHAPE\_ROUNDED Rectangle TruecallerSdkScope.BUTTON\_SHAPE\_RECTANGLE **Footer CTA text \[** .footerType() **\]** To configure the text of the additional footer CTA present at the bottom Footer CTA string TruecallerSdkScope value Use another number TruecallerSdkScope.FOOTER\_TYPE\_CONTINUE Use another method TruecallerSdkScope.FOOTER\_TYPE\_ANOTHER\_METHOD Enter details manually TruecallerSdkScope.FOOTER\_TYPE\_MANUALLY Later TruecallerSdkScope.FOOTER\_TYPE\_LATER **Privacy policy text \[** .privacyPolicyUrl() **\]** To add your privacy policy link on the verification screen ( optional ), you can configure the respective hyperlink as mentioned below Copy **Terms of service text \[ .termsOfServiceUrl() \]** To add your terms of service link on the verification screen ( optional ), you can configure the respective hyperlink as mentioned below Copy **Language** To customise the profile dialog in any of the supported Indian languages To do so, add the following lines before calling the "getUserProfile()" method as mentioned in the previous step Copy Currently supported languages : Language locale value to use english en hindi hi marathi mr telugu te malayalam ml urdu ur punjabi pa tamil ta bengali bn kannada kn swahili sw arabic ar circle-info _NOTE : In case the input locale is not supported, the profile will by default be shown in English language._ [PreviousInitialisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/initialisation) [NextImplement Callbackschevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/implement-callbacks) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy .privacyPolicyUrl("<>") Copy .termsOfServiceUrl("<>") Copy Locale locale = new Locale("ru"); TruecallerSDK.getInstance().setLocale(locale); sun-brightdesktopmoon --- # Customisation | Truecaller for Developers Truecaller SDK provides you with capabilities to configure the following: ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FlaFG2xmhOyuNRXaxPju6%252FB.jpeg%3Falt%3Dmedia%26token%3Dab5338c8-42be-4478-baf3-31941a0aa7db&width=768&dpr=3&quality=100&sign=824c25dc&sv=2) Refer to the below section for details on all the customization capabilities and the possible values you may set: Copy TcSdkOptions.Builder(this, tcOAuthCallback) .buttonShapeOptions(TcSdkOptions.BUTTON_SHAPE_ROUNDED) .footerType(TcSdkOptions.FOOTER_TYPE_ANOTHER_MOBILE_NO) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ONLY_TC_USERS) .ctaText(TcSdkOptions.CTA_TEXT_ACCEPT) .heading(TcSdkOptions.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .buttonColor(1111) .buttonTextColor(1111) .build() **Contextual header \[ .heading() \]** To provide the appropriate context of verification to the Truecaller user, use one of the below mentioned TruecallerSdkScope values to show the corresponding message to the user Log in to TcSdkOptions.SDK\_CONSENT\_HEADING\_LOG\_IN\_TO Sign up with TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGNUP\_WITH Sign in to TcSdkOptions.SDK\_CONSENT\_HEADING\_SIGN\_IN\_TO Verify number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_NUMBER\_WITH Register with TcSdkOptions.SDK\_CONSENT\_HEADING\_REGISTER\_WITH Get started with TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_STARTED\_WITH Proceed with TcSdkOptions.SDK\_CONSENT\_HEADING\_PROCEED\_WITH Verify with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_WITH Verify profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PROFILE\_WITH Verify your profile with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_PROFILE\_WITH Verify your phone number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_PHONE\_NO\_WITH Verify your number with TcSdkOptions.SDK\_CONSENT\_HEADING\_VERIFY\_YOUR\_NO\_WITH Continue with TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_WITH Complete order with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_ORDER\_WITH Place order with TcSdkOptions.SDK\_CONSENT\_HEADING\_PLACE\_ORDER\_WITH Complete booking with TcSdkOptions.SDK\_CONSENT\_HEADING\_COMPLETE\_BOOKING\_WITH Checkout with TcSdkOptions.SDK\_CONSENT\_HEADING\_CHECKOUT\_WITH Manage Details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_DETAILS\_WITH Manage your details with TcSdkOptions.SDK\_CONSENT\_HEADING\_MANAGE\_YOUR\_DETAILS\_WITH Login to <> with one tap TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_TO\_WITH\_ONE\_TAP Subscribe to TcSdkOptions.SDK\_CONSENT\_HEADING\_SUBSCRIBE\_TO Get updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_UPDATES\_FROM Continue reading on TcSdkOptions.SDK\_CONSENT\_HEADING\_CONTINUE\_READING\_ON Get new updates from TcSdkOptions.SDK\_CONSENT\_HEADING\_GET\_NEW\_UPDATES\_FROM Log in/ Signup with TcSdkOptions.SDK\_CONSENT\_HEADING\_LOGIN\_SIGNUP\_WITH **Button text options \[ .ctaTextPrefix() \]** To set the prefix on the CTA button Continue TcSdkOptions.CTA\_TEXT\_CONTINUE Proceed TcSdkOptions.CTA\_TEXT\_PROCEED Accept TcSdkOptions.CTA\_TEXT\_ACCEPT Confirm TcSdkOptions.CTA\_TEXT\_COFIRM **Button shape \[ .buttonShapeOptions() \]** To chose the shape of the CTA button Round TcSdkOptions.BUTTON\_SHAPE\_ROUNDED Rectangle TcSdkOptions.BUTTON\_SHAPE\_RECTANGLE **Footer CTA text \[ .footerType() \]** To configure the text of the additional footer CTA present at the bottom Use another number TcSdkOptions.FOOTER\_TYPE\_CONTINUE Use another method TcSdkOptions.FOOTER\_TYPE\_ANOTHER\_METHOD Enter details manually TcSdkOptions.FOOTER\_TYPE\_MANUALLY Later TcSdkOptions.FOOTER\_TYPE\_LATER **Privacy policy :** To add your privacy policy link on the verification screen, you can configure the respective hyperlink from your developer account **Terms of service:** To add your terms of service link on the verification screen, you can configure the respective hyperlink from your developer account **Language** You can optionally customize the consent screen in any of the supported languages. To do so, add the following line : Copy Currently supported languages: english en hindi hi marathi mr telugu te malayalam ml urdu ur punjabi pa tamil ta bengali bn kannada kn swahili sw arabic ar [PreviousInvocationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/invocation) [NextClearing SDK Instancechevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/clearing-sdk-instance) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val locale = Locale("hi") // change language to Hindi TcSdk.getInstance().setLocale(locale) sun-brightdesktopmoon --- # Handling Error Scenarios | Truecaller for Developers **Failure/ Error responses** The **"onFailureProfileShared"** callback method that you just implemented in the previous step helps you to handle all the possible failure cases when the user couldn't be verified successfully via the Truecaller flow. Below are some of the possible failure scenarios and the corresponding error response that you receive for each of the cases : Error Code What it means 1 Network Failure 2 User pressed back 3 Incorrect Partner Key 4 & 10 User not Verified on Truecaller\* 5 Truecaller App Internal Error 13 User pressed back while verification in process 14 User pressed footer CTA (" USE ANOTHER NUMBER") 15 To handle ActivityNotFound Exception, in case Truecaller app fails to initiate _\*__**Error Type 4**_ _and_ _**Error Type 10**_ _could arise in different conditions depending on whether the user has not registered on Truecaller app on their smartphone_ _**or**_ _if the user has deactivated their Truecaller profile at any point of time from the app._ Apart from the above mentioned error cases, there are few other error scenarios that you may encounter under rare circumstances. For complete and exhaustive list of all the error cases, you can refer to _**TrueError.class**_ within the SDK. Please note that when you encounter any of the error scenarios and get the control in the "onFailureProfileShared()" method, you should redirect the user to your alternate verification flow. **Exceptions** In case you face any of the following run time exceptions, please follow the recommended steps as mentioned below : _"No compatible client available. Please change your scope"_ As the exception suggests, you are trying to call an SDK method even though no client is available to handle it. This usually happens if you have initialised the SDK using _WITHOUT\_OTP_ scope option i.e to verify only the Truecaller users, and you are not calling `isUsable()` method before calling an SDK method. To resolve this, call `isUsable()` before calling any SDK method if you are using _WITHOUT\_OTP_ scope option _"Please call init() on TruecallerSDK first"_ This exception suggests that you are trying to call an SDK method before the SDK has been initialised. To resolve it, check for all possible user flows in your app which could lead to calling an SDK method directly before it has been initiali_s_ed. [PreviousClearing SDK instancechevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/clearing-sdk-instance) [NextVerifying non Truecaller userschevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # For Non-Truecaller users verification flow | Truecaller for Developers Once the SDK shares the _accessToken_ for any user verified via drop call / OTP based verificaiton flow, you can verify the authenticity of the access token by making API call from your server to Truecaller's server. The following endpoint will return phone number and country code for the given access token. **API Endpoint:** Copy Copy "https://sdk-otp-verification-noneu.truecaller.com/v1/otp/installation/phoneNumberDetail/{accessToken}" **REQUEST :** **Method :** GET **Header Parameters:** **Parameter Name** **Required** **Description** **Example** appKey yes App Key ( Partner Key ) zHTqS70ca9d3e988946f19a65a01dRR5e56460 **Request Path Parameters:** **Parameter Name** **Required** **Description** **Example** accessToken yes token granted for the partner for the respective user number that initiated login "71d8367e-39f7-4de5-a3a3-2066431b9ca8" **RESPONSE:** * 200 OK - _If access token is valid_ Copy Copy { "phoneNumber":919999XXXXX9 "countryCode":"IN" } * 404 Not Found - _If your credentials are not valid_ Copy * 404 Not Found - _If access token is invalid_ Copy * 500 Internal Error - _for any other internal error_ Copy [PreviousFor Truecaller users verification flowchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-truecaller-users-verification-flow) [NextInstrumentationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/instrumentation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy { "code":404 "message":"Invalid partner credentials." } Copy { "code":1404 "message":"Invalid access token." } Copy { "code":500 "message":"error message" } sun-brightdesktopmoon --- # General | Truecaller for Developers **What is Truecaller SDK ?** Truecaller SDK is a user consent based, instant, mobile number verification service, which you can use at any touch point in your user journey where you look to verify your users. To know more, read [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk) **Why should I use Truecaller SDK ?** Leading products like 1mg, Gaana, OYO, Grofers, Myntra, and more, leverage Truecaller SDK to increase user growth and reduce user abandonment. To know more, read [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/why-truecaller-sdk) **For which use cases can I use Truecaller SDK to verify mobile number of my app users ?** Number verification use cases can be around user on-boarding, login, registration, number verification at checkout etc. You may refer to this [sectionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/implementing-user-flow-for-your-app) to see some of the examples use cases of mobile number verification via Truecaller SDK **Which platforms can I use Truecaller SDK on ?** Truecaller SDK is available for : * Android apps \[ [learn morearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/implementing-user-flow-for-your-app)\ \] * iOS apps \[ [learn morearrow-up-right](https://github.com/truecaller/ios-sdk)\ \] * Mobile websites and interfaces \[ [learn morearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/implementing-user-flow-for-your-mobile-website)\ \] **Can I use Truecaller SDK to verify mobile numbers for all my app users globally ?** Truecaller SDK v2.0 has 2 key functionalities. * With the **1-tap verification** functionality, you can verify mobile number of any active Truecaller app user (**globally**) on your app ( For native android & iOS apps, react native and mobile websites, PWAs on android ) * With the **missed call based functionality**, you can verify mobile number of any user who may not be an active Truecaller app user. The missed call functionality is currently available for **India** market and on native **android and react native** platform only **Is Truecaller SDK free to use ?** Yes - Truecaller SDK is 100% free to use, no user verification limits whatsoever. **Do users need to type / provide their mobile number to complete verification via Truecaller SDK on my app ?** If the user has Truecaller app present on their device with a verified profile, Truecaller SDK facilitates zero effort user flow - which does not require users to type / provide their mobile numbers. This also helps in avoiding any typos. In case the Truecaller app is not present on the user's device, the android SDK will facilitate the verification via drop call based background verification / SMS based OTP. For this, the user will have to input their mobile number on your android app interface to trigger the verification **What information does my app receive when users consent to verify via Truecaller SDK on my app ?** Once users consent to verify via Truecaller SDK on your platform, you shall receive verified mobile number and name for all users, and other profile information such as email, city etc. **Does Truecaller SDK receive any information from my app ?** Truecaller SDK does not capture any information from 3rd party platforms, and neither has any visibility to any user activities. The entire process of verification for Truecaller users is completely 1-way in nature, meaning that there is absolutely no data handshake involved. For verifying non-Truecaller users in your android app, the SDK needs the mobile number and name of the user to complete the verification process. **How do I get started integrating Truecaller SDK / next steps for integration ?** * For Android : Refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app) * For Mobile Websites ( Currently for Android Browsers only ) : Refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website) * for iOS : Refer [herearrow-up-right](https://github.com/truecaller/ios-sdk) circle-info For any queries, feel free to reach out to us via [https://developer.truecaller.com/contactarrow-up-right](https://developer.truecaller.com/contact) [PreviousFAQSchevron-left](https://docs.truecaller.com/truecaller-sdk/faqs) [NextDeveloper Accountchevron-right](https://docs.truecaller.com/truecaller-sdk/faqs/developer-account) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Non Truecaller User Verification | Truecaller for Developers This section defines the steps that can be used to trigger verification of non Truecaller app users which will be powered via Truecaller's drop call based verification flow In order to verify both the Truecaller users (via OAuth Flow) and the non-Truecaller users (via manual verification), follow these steps : 1. Enable the Non Truecaller user verification capability for your app, by going to your project on the Truecaller developer portal and navigating to the bottom section. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252Frf1k3nzGI2Z1lhpu0ZSj%252FC.png%3Falt%3Dmedia%26token%3D8aa2cc06-2e25-40a0-9aa7-29cd79590670&width=768&dpr=3&quality=100&sign=5d9a4d47&sv=2) 1. Configure sdkOptions in the TcSdkOptions Builder and supply a value of **TcSdkOptions.OPTION\_VERIFY\_ALL\_USERS** to it like below. 1. Configure permissions required by the SDK : 1. Once you receive a callback in the `TcOAuthCallback#onVerificationRequired()`, you can initiate the verification for the user by calling the following method: Here - * the first parameter is the country code of the mobile number for which the verification needs to be triggered * the second parameter (PHONE\_NUMBER\_STRING) is the mobile number to be verified. Please ensure proper validations are in place so as to send correct phone number string to the above method, otherwise an exception would be thrown * the third parameter is an instance of VerificationCallback as defined [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) ​ * the fourth parameter is an instance of FragmentActivity Please note that Truecaller OAuth SDK v3.0.0 currently supports the verification for non-Truecaller users for Indian numbers only 1. Once you initiate the verification via `TcSdk.getInstance().requestVerification()` method, you will receive either a callback in your `VerificationCallback` instance with a specific `requestType` as described below **onRequestSuccess()** method is called under any of the following scenarios - * When drop call is successfully initiated for the input mobile number. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_INITIATED` * When drop call is successfully detected on that device by the SDK present in your app. In this case, you will get the callbackType as `VerificationCallback.TYPE_MISSED_CALL_RECEIVED` * When the verification is successful for a particular number. In this case, you will get the callbackType as `VerificationCallback.TYPE_VERIFICATION_COMPLETE` * When the user is already verified on that particular device before. In this case, you will get the callbackType as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE` When **callbackType** is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`, you will receive an additional parameter for the time to live i.e TTL (in seconds) which is passed as String extra in the `VerificationDataBundle` of `onRequestSuccess()`. This value determines amount of time left to complete the verification. You can use this value to show a waiting message to your user before they can try for another attempt. Once the TTL expires, you can either auto-retry the verification by calling the requestVerification() method automatically with the same input parameters OR you can also take the user back to the number input screen to enter a different number for verification. When the **callbackType** is `VerificationCallback.TYPE_ALREADY_VERIFIED_BEFORE` or `VerificationCallback.TYPE_VERIFICATION_COMPLETE`, it means that the user verification via Truecaller SDK is complete. In these cases, the SDK will share an additional access token with your application, which you may then use to validate the response at your server end. To fetch the access token, you may use the following code snippet : Post fetching the access token, you may perform the server side validation by referring to the steps mentioned in the later part of the documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/server-side-validation) onRequestFailure() method will be called when some error has occurred while verifying the provided mobile number. You will receive the appropriate error message from TrueException using TrueException#getExceptionMessage().For details of different possible error types you may encounter, please refer to the [TrueExceptionarrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0/integration-steps/non-truecaller-user-verification/trueexception) [PreviousFetching User Profilechevron-left](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/integrating-with-your-backend/fetching-user-profile) [NextCompleting Verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/integration-steps/non-truecaller-user-verification/completing-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy val tcSdkOptions = TcSdkOptions.Builder(this, tcOAuthCallback) .sdkOptions(TcSdkOptions.OPTION_VERIFY_ALL_USERS) . // other customizations (if any) .build() Copy For Android 8 and above : ​ ​ ​ For Android 7 and below : ​ Copy try{ TcSdk.getInstance().requestVerification("IN", , verificationCallback, context); }catch (RuntimeException e){ Log.i(TAG, e.getMessage()); } Copy override fun onRequestSuccess(callbackType: Int,verificationDataBundle : VerificationDataBundle?) { when(callbackType){ VerificationCallback.TYPE_MISSED_CALL_INITIATED)-> { //missed-call initiated if(verificationDataBundle != null){ verificationDataBundle.getString(VerificationDataBundle.KEY_TTL) verificationDataBundle.getString(VerificationDataBundle.KEY_REQUEST_NONCE) } } VerificationCallback.TYPE_MISSED_CALL_RECEIVED)-> { //missed-call received } VerificationCallback.TYPE_VERIFICATION_COMPLETE)-> { //verification complete } VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE)-> { //user already verified } } } override fun onRequestFailure(callbackType: Int, trueException : TrueException) { //Exception } }; Copy //For when the control goes to TYPE_ALREADY_VERIFIED_BEFORE verificationDataBundle.getProfile().accessToken //For when the control goes to TYPE_VERIFICATION_COMPLETE verificationDataBundle.getString(VerificationDataBundle.KEY_ACCESS_TOKEN) sun-brightdesktopmoon --- # Completing Verification | Truecaller for Developers 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 : Copy Copy 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. circle-info 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: DropcallOTPCopy Copy 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 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](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-non-truecaller-users-verification-flow) . [PreviousTrueExceptionchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users/trueexception) [NextAdvanced Stepschevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/advanced-steps) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Implement Callbacks | Truecaller for Developers 7\. Add the following condition in the onActivityResult method `TruecallerSDK.getInstance().onActivityResultObtained( this,requestCode, resultCode, data)` Copy Copy @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == TruecallerSDK.SHARE_PROFILE_REQUEST_CODE) { TruecallerSDK.getInstance().onActivityResultObtained(this, requestCode, resultCode, data); } } > Note : In case you passed Fragment in the getUserProfile() method \[ point #6 \], override the onActivityResult() method in your corresponding Fragment 8\. In your selected Activity/Fragment, either make the component implement ITrueCallback or create an instance of it : Copy Copy private final ITrueCallback sdkCallback = new ITrueCallback() { @Override public void onSuccessProfileShared(@NonNull final TrueProfile trueProfile) { } @Override public void onFailureProfileShared(@NonNull final TrueError trueError) { } @Override public void onVerificationRequired(@Nullable final TrueError trueError) { } }; _onSuccessProfileShared()_ method will be called in either of the following two scenarios : a.) When the user has agreed to share his profile information with your app by clicking on the "Continue" button on the Truecaller dialog b.) When a non Truecaller user is already verified previously on the same device. This would only happen when the `**TruecallerSdkScope#SDK_OPTION_WITH_OTP**` is selected while initialising the SDK to provision for the verification of non-Truecaller users also. _onFailureProfileShared()_ method will be called when some error occurs or if an invalid request for verification is made. You'll get the respective error code as per the details mentioned [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/handling-error-scenarios) . onVerificationRequired() method will only be called when`**TruecallerSdkScope#SDK_OPTION_WITH_OTP**` is selected. This will be called when the user is not a Truecaller app user. Also, you'll get a [Nullable TrueError](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/handling-error-scenarios) only when TC app is installed and user is logged in. For other cases, it would be null. This optional TrueError can be used to determine the user action that led to initiating manual verification. So using this TrueError, you can get to whether the user pressed on the _footer CTA_ on the verification screen OR the _system back_ button. Write all the relevant logic in the above callback methods to handle the scenarios appropriately. [PreviousCustomisationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/customisation) [NextClearing SDK instancechevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/clearing-sdk-instance) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Verifying non Truecaller users | Truecaller for Developers This section defines the steps that can be used to trigger verification of non Truecaller app users which will be powered via Truecaller's drop call based verification flow In order to verify non Truecaller users, the SDK requires the below mentioned permissions - Copy Copy For Android 8 and above : For Android 7 and below : Once you receive a callback in the `ITrueCallback#onVerificationRequired(),` you can initiate the verification for the user by calling the following method: Copy Copy try{ TruecallerSDK.getInstance().requestVerification("IN", PHONE_NUMBER_STRING, apiCallback, ExampleActivity.this); }catch (RuntimeException e){ Log.i(TAG, e.getMessage()); } Here - * the first parameter is the country code of the mobile number for which the verification needs to be triggered * the second parameter (PHONE\_NUMBER\_STRING) is the mobile number to be verified. Please ensure proper validations are in place so as to send correct phone number string to the above method, otherwise an exception would be thrown * the third parameter is an instance of `VerificationCallback` as defined [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users/trueexception) * the fourth parameter is an instance of FragmentActivity _**Please note that Truecaller SDK v2.8.0 currently supports the verification for non-Truecaller users for Indian numbers only.**_ Once you initiate the verification via `TruecallerSDK.getInstance().requestVerification()` method, you will receive either a callback in your `VerificationCallback` instance with a specific`requestType` as described below Copy _onRequestSuccess()_ method is called under any of the following scenarios - * When drop call is successfully initiated for the input mobile number. In this case, you will get the _requestCode_ as `VerificationCallback.TYPE_MISSED_CALL_INITIATED` * When drop call is successfully detected on that device by the SDK present in your app. In this case, you will get the _requestCode_ as `VerificationCallback.TYPE_MISSED_CALL_RECEIVED` * When the verification is successful for a particular number. In this case, you will get the requestCode as `VerificationCallback.TYPE_VERIFICATION_COMPLETE` * When the user is already verified on that particular device before. In this case, you will get the requestCode as `VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE` When requestCode is `VerificationCallback.TYPE_MISSED_CALL_INITIATED`, you will receive an additional parameter for the time to live i.e TTL (in seconds) which is passed as String extra in the `VerificationDataBundle` of `onRequestSuccess()`. This value determines amount of time left to complete the verification. You can use this value to show a waiting message to your user before they can try for another attempt. Once the TTL expires, you can either auto-retry the verification by calling the requestVerification() method automatically with the same input parameters OR you can also take the user back to the number input screen to enter a different number for verification. NOTE: Truecaller SDK v2.5.0 & above won't throw timeout exceptions for missed call, so please use the TTL as stated above to control the time out scenario. When the requestCode is VerificationCallback.TYPE\_ALREADY\_VERIFIED\_BEFORE or VerificationCallback.TYPE\_VERIFICATION\_COMPLETE, it means that the user verification via Truecaller SDK is complete. In these cases, the SDK will share an additional access token with your application, which you may then use to validate the response at your server end. To fetch the access token, you may use the following code snippet : `//For when the control goes to TYPE_ALREADY_VERIFIED_BEFORE extras.getProfile().accessToken` `//For when the control goes to TYPE_VERIFICATION_COMPLETE extras.getString(VerificationDataBundle.KEY_ACCESS_TOKEN)` Post fetching the access token, you may perform the server side validation by referring to the steps mentioned in the later part of the documentation [here](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/server-side-response-validation/for-non-truecaller-users-verification-flow) . _onRequestFailure()_ method will be called when some error has occurred while verifying the provided mobile number. You will receive the appropriate error message from TrueException using `TrueException#getExceptionMessage().`For details of different possible error types you may encounter, please refer to the [next section](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users/trueexception) . [PreviousHandling Error Scenarioschevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/handling-error-scenarios) [NextTrueExceptionchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users/trueexception) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy static final VerificationCallback apiCallback = new VerificationCallback() { @Override public void onRequestSuccess(int requestCode, @Nullable VerificationDataBundle extras) { if (requestCode == VerificationCallback.TYPE_MISSED_CALL_INITIATED) { if(extras != null){ extras.getString(VerificationDataBundle.KEY_TTL) extras.getString(VerificationDataBundle.KEY_REQUEST_NONCE) } } if (requestCode == VerificationCallback.TYPE_MISSED_CALL_RECEIVED) { } if (requestCode == VerificationCallback.TYPE_VERIFICATION_COMPLETE) { if(extras != null) extras.getString(VerificationDataBundle.KEY_REQUEST_NONCE) } if (requestCode == VerificationCallback.TYPE_PROFILE_VERIFIED_BEFORE) { if(extras!=null) extras.getProfile().requestNonce } } @Override public void onRequestFailure(final int requestCode, @NonNull final TrueException e) { } }; sun-brightdesktopmoon --- # Changelog | Truecaller for Developers Changelog for Truecaller android SDK versions 2.8.0 and below : SDK Version Changelog ( if applicable ) 2.8.0 1. New errors codes introduced in TrueException for "simState", "airplaneMode" and "permissions". Details [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app/verifying-non-truecaller-users/verificationcallback) 2. Developers need to take care of the required permissions requesting logic at their own end since SDK won't be making permissions any longer from this version onwards 3. Default verification medium would be Drop Call for all verification attempts made 4. Developers can set a request nonce to the non-tc flow using the existing SDK method - **TruecallerSDK.getInstance().setRequestNonce("SOME\_REQUEST\_NONCE").** The partners will receive this request nonce from the callback interface for different callback types : 1. **TYPE\_MISSED\_CALL\_INITIATED, TYPE\_VERIFICATION\_COMPLETE** - Can be received from VerificationDataBundle as `_bundle?.getString(VerificationDataBundle.KEY_REQUEST_NONCE)_` 2. **TYPE\_PROFILE\_VERIFIED\_BEFORE -** Can be received from VerificationDataBundle as `bundle?.profile?.requestNonce` 2.7.0 * Minimum supported version updated to 5.1 Android version * Minimum kotlin version supported 1.6.10 * Removed all the sensitive checks colliding with google play’s data privacy policies * Project moved to MavenCentral 2.6.0 * To handle [requestCode collision](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/implement-callbacks) new check on the client side onActivityResult method is introduced. * Handled request code collision in SDK * Fix SDK Android 11 compatibility * Added business profile indicator 2.5.0 * Provided new [SDK clear()](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/clearing-sdk-instance) method on client side * Fixed memory leaks. * Handle ActivityNotFoundException by providing a try-catch block and throwing a new TrueError code with Type = 15. 2.4.0 * Passing TrueError in onVerificationRequired() method of the SDK * Exposed verification TTL to verification callback on client side * Fixing default values for CTA color/text color * Ellipsize text input fields in SDK 2.3.0 * Updated proguard rule * Fixed phone number caching in non Truecaller user verification flow * Minor bug fixes 2.2.0 * Added support for Arabic and Assamese 2.1.0 * Ability to set [Dark/Light theme](https://docs.truecaller.com/truecaller-sdk/product-updates/introducing-dark-theme) from SDK introduced. [PreviousGoogle Play Policy Change for Device Identifierschevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/getting-release-ready/google-play-policy-change-for-device-identifiers) [NextChange Logchevron-right](https://docs.truecaller.com/truecaller-sdk/android/change-log) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Android OAuth SDK | Truecaller for Developers **How does Truecaller SDK work for android apps?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/implementing-user-flow-for-your-app) for details. **Can I use Truecaller SDK to verify mobile numbers for all my app users globally?** Truecaller SDK v3.0 has 2 key functionalities: * With the **1-tap verification** functionality, you can verify mobile number of any active Truecaller app user (**globally**) on your app. * With the **missed call based functionality**, you can verify mobile number of any user who may not be an active Truecaller app user. The missed call functionality is currently available for **India** market and on android platform only. **Where can I find the technical documentation for integration on my android app?** Please refer to the technical documentation here. **What is the right way / How do I implement the user flow in my app using Truecaller SDK?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/scenarios-for-all-user-verifications-truecaller-and-non-truecaller-users) for details. **Why do I not get any callback after clicking any CTA on the consent screen.** In this case please check the instance that you pass in the method below: `TcSdk.getInstance().getAuthorizationCode(this);` It should be of the activity/fragment where you have initialized the SDK. **How can I find the SHA1 of my android app build?** Please refer here for details. **What is the** TcSdk.getInstance().isOAuthFlowUsable() **method used for?** The isOAuthFlowUsable method, helps you check if the Truecaller SDK can be used for user verification or not. Depending on the "sdkOptions" scope you have defined while initialising the Truecaller SDK ( OPTION\_VERIFY\_ONLY\_TC\_USERS or OPTION\_VERIFY\_ALL\_USERS ), below are the expected results: OPTION\_VERIFY\_ALL\_USERS: In this case, Truecaller SDK can be used to verify existing Truecaller users as well as non-Truecaller app users ( via missed call/ OTP flow ), hence isUsable() method would always return "true". OPTION\_VERIFY\_ONLY\_TC\_USERS: In this case, Truecaller SDK can be used to verify only existing Truecaller users, hence isUsable() method would return "true" only if the users have Truecaller SDK on their devices. It would return "false" otherwise. **How do I fetch the Truecaller user profile after receiving the success callback ?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.1.0/integration-steps/integrating-with-your-backend) . **Does Truecaller OAuth one tap SDK need any app permission?** For the verification of existing Truecaller users who have the app present on their smartphones, the SDK does not require any android system permissions, whatsoever. **How can I test my application with Truecaller SDK integration to make it release ready?** For details on test scenarios and setup, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.0.0/getting-release-ready/testing-your-verification-flow) . **Do I need to submit an app permissions declaration form while uploading my app on google play store?** If you are also using the missed call based _**non Truecaller user verification**_ functionality of the SDK ( currently supported for _**India**_ only ), you need specific phone permissions as described [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app/verifying-non-truecaller-users) . For submitting your application on Google play store, please refer to our **recommended guidelines** [**here**arrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/getting-release-ready/google-play-store-app-permissions-declaration) **.** [PreviousAndroid App SDKchevron-left](https://docs.truecaller.com/truecaller-sdk/faqs/android-app-sdk) [NextMobile Web SDKchevron-right](https://docs.truecaller.com/truecaller-sdk/faqs/mobile-web-sdk) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Initialisation | Truecaller for Developers 6\. Create a TruecallerSdkScope object by using the appropriate configurational settings and use it to initialise the TruecallerSDK in your android activity's onCreate method : Copy Copy TruecallerSdkScope trueScope = new TruecallerSdkScope.Builder(this, sdkCallback) .consentMode(TruecallerSdkScope.CONSENT_MODE_BOTTOMSHEET) .buttonColor(Color.parseColor(colorSpinner.getSelectedItem().toString())) .buttonTextColor(Color.parseColor(colorTextSpinner.getSelectedItem().toString())) .loginTextPrefix(TruecallerSdkScope.LOGIN_TEXT_PREFIX_TO_GET_STARTED) .loginTextSuffix(TruecallerSdkScope.LOGIN_TEXT_SUFFIX_PLEASE_VERIFY_MOBILE_NO) .ctaTextPrefix(TruecallerSdkScope.CTA_TEXT_PREFIX_USE) .buttonShapeOptions(TruecallerSdkScope.BUTTON_SHAPE_ROUNDED) .privacyPolicyUrl("<>") .termsOfServiceUrl("<>") .footerType(TruecallerSdkScope.FOOTER_TYPE_NONE) .consentTitleOption(TruecallerSdkScope.SDK_CONSENT_TITLE_LOG_IN) .sdkOptions(TruecallerSdkScope.SDK_OPTION_WITHOUT_OTP) .build(); TruecallerSDK.init(trueScope); You will find complete details on the configuration options in the TruecallerSdkScope object as described above, and all the possible available values in the immediate next section of this documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app/customisation-1) . circle-info Here, _**sdkCallback**_ is an interface that you need to define in your app where you would get the success or failure callbacks. You will find details about the implementation in this [section](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/implement-callbacks) . Please note, _**sdkOptions**_ enables you to configure the verification capability of Truecaller SDK. If you want to use the SDK for verification of Truecaller users only, you should provide the scope value as _TruecallerSdkScope.SDK\_OPTION\_WITHOUT\_OTP_ If you want to use the SDK for verification of Truecaller users as well as non-Truecaller users powered by Truecaller's drop call / OTP ( for implementation details, refer [Verifying non-Truecaller users](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users) section ), you should provide the scope value as _TruecallerSdkScope.SDK\_OPTION\_WITH\_OTP_ Truecaller SDK needs to be initialised only once and the same instance can be accessed at any place within your app, without the need to initialise it again, via `TruecallerSDK.getInstance()` circle-info Initialising the SDK at more than one place can lead to undesired behaviour Once you initialise the TruecallerSDK using the init() method, if you are using the SDK for verification of only Truecaller users ( by setting the _sdkOptions_ scope as TruecallerSdkScope.SDK\_OPTION\_WITHOUT\_OTP ), you can check if the Truecaller app is present on the user's device or not by using the following method Copy ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FVF2O5rPyB5VwflC8e4Th%252F1.webp%3Falt%3Dmedia%26token%3D06c0464f-154d-4126-8c17-efe4cd25aec3&width=768&dpr=3&quality=100&sign=759c7b54&sv=2) You can trigger the Truecaller profile verification dialog anywhere in your app flow by calling the following method Copy ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FDt1PJ8OnAaNEiuflNIh4%252F2.avif%3Falt%3Dmedia%26token%3Dba314e66-6aab-4151-80cc-a8053ffc3a28&width=768&dpr=3&quality=100&sign=b5e09f20&sv=2) You can trigger the Truecaller profile verification dialog anywhere in your app flow by calling the following method Copy ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252F1C74ORr22wE9nfumYDDQ%252F2.avif%3Falt%3Dmedia%26token%3D7b3339bf-ce2d-42b6-b2a6-8a4314abba5d&width=768&dpr=3&quality=100&sign=4303c940&sv=2) In case **isUsable()** method returns false, implying that Truecaller app is not present on the device, you can take the user to your app screen and continue with the [verification flow for non-Truecaller users](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/verifying-non-truecaller-users) OR choose to use your own verification flow \[ Refer image below \]. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FNdgNytfiBQQNhlbDPoUk%252F3.avif%3Falt%3Dmedia%26token%3D2e41eae1-3f07-4b8a-952e-217e266b31d4&width=768&dpr=3&quality=100&sign=345ba2d&sv=2) [PreviousApp Key Configurationchevron-left](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/app-key-configuration) [NextCustomisationchevron-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0-deprecating-soon/integrating-with-your-app/customisation) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy TruecallerSDK.getInstance().isUsable() Copy TruecallerSDK.getInstance().getUserProfile() Copy TruecallerSDK.getInstance().getUserProfile() sun-brightdesktopmoon --- # Initialisation | Truecaller for Developers You can perform user verification via Truecaller at any touchpoint in your journey (for example - login, registration, checkout, verification, etc.). ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FnzPz2XdJ99NESqquXPSs%252FG.avif%3Falt%3Dmedia%26token%3D08c64b04-7e4b-4286-97e2-1be9b317e452&width=768&dpr=3&quality=100&sign=c2f9b041&sv=2) To initiate the user verification, you need to trigger a deep link upon any user action, in the format mentioned below : Here, _**requestNonce**_ should be a unique request ID that you need to associate with every verification request you trigger, so as to do the requisite mapping of the access token which we post to your callback URL once users share their consent. circle-info NOTE : The minimum length of the request ID parameter should be 8 characters and maximum length can be 64 characters Add the app key which you generated from your developer portal account in the _**partnerKey**_ parameter, and the app name that you want users to see in the Truecaller profile dialog in the _**partnerName**_ parameter. ![](https://docs.truecaller.com/truecaller-sdk/~gitbook/image?url=https%3A%2F%2F3916632365-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FJzE3kcOEptTlnx7Hgg25%252Fuploads%252FxbiAbSU1A3OZLzCbBuYI%252FH.webp%3Falt%3Dmedia%26token%3D9bbdeb6d-de00-4a81-801d-6ce2d3bbc7dd&width=768&dpr=3&quality=100&sign=245bb1ac&sv=2) Truecaller SDK verification dialog customisation options The _**lang**_ parameter refers to the language locale string corresponding to the language that you wish the user to see the profile dialog in ( For example - 'en' for English ). For complete list of supported languages in which you can show the profile dialog to the users, please refer below : Language locale value to use english en hindi hi marathi mr telugu te malayalam ml urdu ur punjabi pa tamil ta bengali bn kannada kn swahili sw arabic ar > _NOTE : In case the input locale is not supported, the profile will by default be shown in English language_ The _**loginPrefix**_ string option can be any one of the following parameters depending on what contextual title string prefix ( context/ goal ) you want to show to the user : string to use **"loginPrefix" parameter value** To get started getstarted To continue continue To place order placeorder To complete your order completepurchase To checkout checkout To complete your booking completebooking To proceed with your booking proceedwithbooking To continue with your booking continuewith To get details getdetails To view more viewmore To continue reading continuereading To proceed proceed For new updates newupdates To get updates getupdates To subscribe subscribe To subscribe and get updates subscribeforupdates The _**loginSuffix**_ string option can be any one of the following parameters depending on what contextual title string suffix ( action ) you want to show to the user : string **"loginSuffix" parameter value** please login login please signup signup please login/ signup loginsignup please register register please sign in signin please verify mobile number verifymobile The _**skipOption**_ parameter enables you to add an optional footer string on the verification screen, which on being clicked by users, allows you to take them to your alternate verification flow. It can take any one of the following values: Footer CTA string to use "skipOption" parameter value Use another number useanothernum Use another method useanothermethod Enter details manually manualdetails Later later The **ctaPrefix** parameter lets you choose the prefix string for the contextual text on the CTA button you want to show **Button text to use** "ctaPrefix" parameter value Use use Continue with continuewith Proceed with proceedwith The **btnShape** parameter lets you choose the shape of the CTA button you want to show Button shape "btnShape" parameter value Round round Rectangle rect To customise the color of the CTA button on the verification screen, you need to configure the respective hex code in the "**ctaColor**" parameter as mentioned below : Similarly, in order to customise the color of the text on the CTA button on the verification screen, you need to configure the respective hex code in the "**ctaTextColor**" parameter as mentioned below : circle-info Please note that for using the hex codes of any color in the deep link parameter, you need to add **%23** before your hexcode. For example: if you are using hex code for **#F75D34,** then in the deep link you need to configure the value **%23f75d34** To add your privacy policy link on the verification screen ( optional ), you can configure the hyperlink string ( URL safe ) to your privacy policy page in the "**privacyUrl**" parameter as mentioned below : To add your terms of service link on the verification screen ( optional ), you can configure the hyperlink string ( URL safe ) to your terms of service page in the "**termsUrl**" parameter as mentioned below : "**Timeout**" (ttl) parameter allows you to automatically dismiss the consent screen by adding the "ttl" value to the deeplink. The TTL feature enhances user flexibility and streamlines the verification process. **Here's how the TTL feature works:** * The default minimum value for the TTL is set to _8000ms_ (8s), ensuring a smooth user experience. If the "ttl" parameter is defined with a value less than 8000ms, it will automatically default to 8000ms. This means that if the user does not proceed with the flow within 8000ms, the consent screen will be automatically dismissed. * There is no maximum value for the "ttl" parameter, giving you the freedom to set longer durations, if required. The timer value should be specified in milliseconds, allowing precise control over the consent screen duration. * In cases where you do not specify the "ttl" parameter in the deeplink, the consent dialog will persist indefinitely, providing users with ample time to interact and proceed with the verification flow. [PreviousIntegrating with your mobile websitechevron-left](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website) [NextInvoking verificationchevron-right](https://docs.truecaller.com/truecaller-sdk/mobile-websites/integrating-with-your-mobile-website/invoking-verification) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon Copy window.location = "truecallersdk://truesdk/web_verify? type=btmsheet requestNonce=UNIQUE_REQUEST_ID &partnerKey=YOUR_APP_KEY &partnerName=YOUR_APP_NAME &lang=LANGUAGE_LOCALE &privacyUrl=LINK_TO_YOUR_PRIVACY_PAGE &termsUrl=LINK_TO_YOUR_TERMS_PAGE &loginPrefix=TITLE_STRING_PREFIX &loginSuffix=TITLE_STRING_SUFFIX &ctaPrefix=BUTTON_TEXT_PREFIX &ctaColor=BUTTON_FILL_COLOR &ctaTextColor=BUTTON_TEXT_COLOR &btnShape=BUTTON_SHAPE &skipOption=FOOTER_CTA_STRING &ttl=TIME_IN_MILLISECONDS"; Copy ctaColor=%23f75d34 Copy ctaTextColor=%23f75d34 Copy privacyUrl="<>" Copy termsUrl="<>" Copy TTL based auto dismiss functionality would work if the end-user is having Truecaller app sun-brightdesktopmoon --- # Android App SDK | Truecaller for Developers **How does Truecaller SDK work for android apps?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/implementing-user-flow-for-your-app) for details. **Can I use Truecaller SDK to verify mobile numbers for all my app users globally?** Truecaller SDK v2.0 has 2 key functionalities: * With the **1-tap verification** functionality, you can verify mobile number of any active Truecaller app user (**globally**) on your app. * With the **missed call based functionality**, you can verify mobile number of any user who may not be an active Truecaller app user. The missed call functionality is currently available for **India** market and on android platform only. **Where can I find the technical documentation for integration on my android app?** Please refer to the technical documentation [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app) . **What is the right way / How do I implement the user flow in my app using Truecaller SDK?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/implementing-user-flow-for-your-app) for details. **Why do I get "Partner Unauthorised \[ ERROR\_TYPE : 3 \] " error?** One app key can be used only for a particular combination of package name and SHA1. Different partner key needs to be used for any different combination of the two parameters. You might be getting this error because you're either: * using a wrong app key * using the right key with either or both wrong package name and fingerprint For details on generating and managing app keys for different app builds. Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/generating-app-key) . **How can I find the SHA1 of my android app build?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/generating-app-key) for details. **What is the TruecallerSDK.getInstance().isUsable() method used for?** The isUsable() method, helps you check if the Truecaller SDK can be used for user verification or not. Depending on the "sdkOptions" scope you have defined while initialising the Truecaller SDK ( WITH\_OTP or WITHOUT\_OTP ), below are the expected results: _WITH\_OTP_: In this case, Truecaller SDK can be used to verify existing Truecaller users as well as non-Truecaller app users ( via missed call/ OTP flow ), hence isUsable() method would always return "true". WITHOUT\_OTP: In this case, Truecaller SDK can be used to verify only existing Truecaller users, hence isUsable() method would return "true" only if the users have Truecaller SDK on their devices. It would return false otherwise. **How do I verify the authenticity of Truecaller SDK response?** Please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/server-side-response-validation) . **Does Truecaller SDK need any app permission?** For the verification of existing Truecaller users who have the app present on their smartphones, the SDK does not require any android system permissions, whatsoever. For the automatic verification of users who don't have the Truecaller app on their devices, the SDK can facilitate the verification by sending a drop call in background / fallback SMS based OTP. If you choose to use this service for the verification of non-Truecaller users as well, the SDK will require you to ask for READ\_CALL\_LOG and READ\_PHONE\_STATE permissions. You can read more about the usage of these permissions [herearrow-up-right](https://truecaller4developers.gitbook.io/truecallersdk/v/1.0/android/integrating-with-your-app/verifying-non-truecaller-users) . **How can I test my application with Truecaller SDK integration to make it release ready?** For details on test scenarios and setup, please refer [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/getting-release-ready/testing-your-verification-flow) . **Do I need to submit an app permissions declaration form while uploading my app on google play store?** If you are also using the missed call based _**non Truecaller user verification**_ functionality of the SDK ( currently supported for _**India**_ only ), you need specific phone permissions as described [herearrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/integrating-with-your-app/verifying-non-truecaller-users) . For submitting your application on Google play store, please refer to our **recommended guidelines** [**here**arrow-up-right](https://docs.truecaller.com/truecaller-sdk/android/sdk-v2.8.0/getting-release-ready/google-play-store-app-permissions-declaration) **.** [PreviousDeveloper Accountchevron-left](https://docs.truecaller.com/truecaller-sdk/faqs/developer-account) [NextAndroid OAuth SDKchevron-right](https://docs.truecaller.com/truecaller-sdk/faqs/android-oauth-sdk) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Email Protection | Cloudflare Please enable cookies. Email Protection ================ You are unable to access this email address docs.truecaller.com --------------------------------------------------------------- The website from which you got to this page is protected by Cloudflare. Email addresses on that page have been hidden in order to keep them from being accessed by malicious bots. **You must enable Javascript in your browser in order to decode the e-mail address**. If you have a website and are interested in protecting it in a similar way, you can [sign up for Cloudflare](https://www.cloudflare.com/sign-up?utm_source=email_protection) . * [How does Cloudflare protect email addresses on website from spammers?](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/) * [Can I sign up for Cloudflare?](https://developers.cloudflare.com/fundamentals/setup/account/create-account/) Cloudflare Ray ID: **9ceba22f1a3091fa** • Your IP: Click to reveal 54.237.218.47 • Performance & security by [Cloudflare](https://www.cloudflare.com/5xx-error-landing) --- # Get to know Truecaller Customer Experience Solution | Truecaller for Business circle-info **Truecaller Customer Experience Solution enables businesses to add identity, trust and context to business communication, driving customer loyalty and growth.** With Truecaller CX Solution, businesses can: 1. Establish a prominent brand identity with Verified Business Caller ID with a tamper-proof name, business category and logo. 2. Make calls contextual and crystal-clear for their audience with Call Reason. 3. Leverage Video Caller ID to deliver a more lively communication experience for customers. 4. Get active customer feedback to streamline their operations. 5. Enable customers to show interest for their business offerings even if they miss the communication, with Call Me Back. 6. Build scalable communication experience with APIs that seamlessly integrates into their existing calling infrastructure. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252Fu724NzKye31WiaeEpPYB%252FScreenshot%25202025-07-02%2520095642.png%3Falt%3Dmedia%26token%3D72abd577-6653-43c5-8090-bc4557e13fa3&width=768&dpr=3&quality=100&sign=bee7aa3e&sv=2) [NextCan I get a customized Verified Business Caller ID or choose the color of the Caller ID?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/can-i-get-a-customized-verified-business-caller-id-or-choose-the-color-of-the-caller-id) Last updated 1 month ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Does the Verified Business Caller ID work for iOS users? | Truecaller for Business Yes, the Verified Business Caller ID is supported on iOS. The UI will be different from Android. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252FQ5nfHcSi21OJj5Eqcc0O%252FScam%2520Caller%2520ID%2520iOS%2520%281%29.png%3Falt%3Dmedia%26token%3D5e7759cc-a469-4997-bb57-e1c136d92bf8&width=768&dpr=3&quality=100&sign=da2a7c6c&sv=2) [PreviousDoes the Verified Business Caller ID work on all telco networks, phones and OS platforms?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/does-the-verified-business-caller-id-work-on-all-telco-networks-phones-and-os-platforms) [NextWhat are the iOS settings required to enable the Verified Business Caller ID badge?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-ios-settings-required-to-enable-the-verified-business-caller-id-badge) Last updated 8 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # What are the iOS settings required to enable the Verified Business Caller ID badge? | Truecaller for Business You can turn on the following settings on your iPhone for Truecaller: Settings > Apps > Phone > Call Blocking & Identification > Enable ALL switches for Truecaller circle-check Visit our [Truecaller for iOS arrow-up-right](https://www.truecaller.com/truecaller-for-ios) page for more information. [PreviousDoes the Verified Business Caller ID work for iOS users?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/does-the-verified-business-caller-id-work-for-ios-users) [NextWhat are the Android settings required to enable the Truecaller Caller ID?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id) Last updated 25 days ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Can I use virtual numbers? | Truecaller for Business Yes, you can use virtual or cloud telephony numbers. All official business-owned CLI, PRI, DID, Landline, Mobiles, and virtual numbers can be onboarded on our Verified Business Caller ID. [PreviousWhat are the Android settings required to enable the Truecaller Caller ID?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id) [NextWhat languages are supported in the Verified Business Caller ID?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-languages-are-supported-in-the-verified-business-caller-id) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # What are the Android settings required to enable the Truecaller Caller ID? | Truecaller for Business This document outlines the required checks and configurations on the end user’s device to ensure Truecaller Caller ID functionality works as intended. * * * ### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#id-1.-appear-on-top-permission-allow-truecaller-draw-over-other-apps) 1\. Appear on Top Permission (Allow Truecaller Draw over other apps) #### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#description) Description Truecaller requires the **“Appear on Top”** (also known as “Allow Truecaller Draw over other apps”) permission to display Caller ID overlays during incoming calls. Below warning will appear in case the setting is not enabled. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252Fk4oK99nMnJIRndtlJJRt%252FGemini_Generated_Image_cl4t92cl4t92cl4t.png%3Falt%3Dmedia%26token%3Df520ab0e-b55f-459f-a712-7dea4a3cf313&width=768&dpr=3&quality=100&sign=30e2cecc&sv=2) ### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#how-to-do-it) How to do it? 1. Open the **Truecaller** application. 2. Go to settings 3. Check for a warning message related to permissions. 4. If a warning is displayed, tap **Enable now**. 5. You will be redirected to the device **App Settings**. 6. Locate **Appear on Top** (or **Allow Truecaller Draw over other apps**) and ensure it is **Enabled** for Truecaller as shown in the below screenshot. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252FmKu26NwkcsH1wgYyjeoK%252FEnableAppearonthetop.jpg%3Falt%3Dmedia%26token%3D6a7b1341-a3ec-4a65-a1f7-496a986b4ced&width=768&dpr=3&quality=100&sign=83811e1c&sv=2) #### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#expected-result) Expected Result Once the permission is enabled, the warning message will disappear from within the Truecaller app settings, and Caller ID should function correctly. * * * ### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#id-2.-battery-optimisation-settings-recommended) 2\. Battery Optimisation Settings (Recommended) #### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#description-1) Description Battery optimisation can restrict Truecaller’s background activity, which may prevent Caller ID from displaying correctly. Truecaller requires the **“Disable Battery Optimisation”** permission to display Caller ID overlays during incoming calls. Truecaller will display a warning indicating battery optimisation is enabled under settings. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252FOnuPYwRlQ3h1QZhsZV5c%252FBatterywarning.jpg%3Falt%3Dmedia%26token%3D5f2229b5-1537-4934-8945-b8c37e90795f&width=768&dpr=3&quality=100&sign=5de94e4e&sv=2) #### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#how-to-do-it-1) How to do it? 1. Tap **Disable battery optimization** within the Truecaller app. 2. When prompted, select **Allow**. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252FzpvcXSAfC31eT3ARFPov%252FAllowbattery.jpg%3Falt%3Dmedia%26token%3D285f298c-288d-440e-b3d8-ea6e2a19b5ca&width=768&dpr=3&quality=100&sign=5d8b2a7&sv=2) #### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#expected-result-1) Expected Result The battery optimization warning will be removed, and Caller ID will function without interference. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252FTvm1y6RGwWEuHKDEXpl6%252FNobatterywarning.jpg%3Falt%3Dmedia%26token%3D7352b7df-e1f6-4b1d-b7d3-b866f18bca71&width=768&dpr=3&quality=100&sign=68b7e9d9&sv=2) [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#default-dialer-warning-informational) Default Dialer Warning (Informational) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Description** You may see a warning "Set Truecaller as default dialer" prompting you to set Truecaller as the default dialer. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252Fk8PSAufgw6yFg5ZzL2SQ%252FDefaultDialerwarning.jpg%3Falt%3Dmedia%26token%3D2812bd91-3fe1-4982-8dd4-0fac795586e9&width=768&dpr=3&quality=100&sign=3df29ce1&sv=2) #### [hashtag](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#impact) Impact This setting does not impact Caller ID functionality. * The warning can be safely ignored. [PreviousWhat are the iOS settings required to enable the Verified Business Caller ID badge?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-ios-settings-required-to-enable-the-verified-business-caller-id-badge) [NextCan I use virtual numbers?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/can-i-use-virtual-numbers) Last updated 25 days ago Was this helpful? * [1\. Appear on Top Permission (Allow Truecaller Draw over other apps)](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#id-1.-appear-on-top-permission-allow-truecaller-draw-over-other-apps) * [How to do it?](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#how-to-do-it) * [2\. Battery Optimisation Settings (Recommended)](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#id-2.-battery-optimisation-settings-recommended) * [Default Dialer Warning (Informational)](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-are-the-android-settings-required-to-enable-the-truecaller-caller-id#default-dialer-warning-informational) Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Are there any early access programs I can be a part of? | Truecaller for Business You can reach out to us at [\[email protected\]](https://docs.truecaller.com/cdn-cgi/l/email-protection) for more information on early access programs. [PreviousWhat languages are supported in the Verified Business Caller ID?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/what-languages-are-supported-in-the-verified-business-caller-id) [NextAccount Creationchevron-right](https://docs.truecaller.com/truecaller-for-business/account-creation) Last updated 8 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # What languages are supported in the Verified Business Caller ID? | Truecaller for Business Verified Business Caller ID supports all major Indian languages, along with widely spoken global languages such as Spanish, Hebrew, Arabic, French, and Malay, ensuring a seamless experience for users across diverse regions. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252Fx75pNcUP02tGQV6W9yVg%252FLanguage%2520capabilties.png%3Falt%3Dmedia%26token%3D9e8e78e0-233a-4054-90d8-43827842b31e&width=768&dpr=3&quality=100&sign=36ae98fe&sv=2) [PreviousCan I use virtual numbers?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/can-i-use-virtual-numbers) [NextAre there any early access programs I can be a part of?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/are-there-any-early-access-programs-i-can-be-a-part-of) Last updated 3 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Account Management and Billing | Truecaller for Business Get answers to all your queries related to account management, subscriptions and billing in this section. [PreviousWho will have access to Manage Listing?chevron-left](https://docs.truecaller.com/truecaller-for-business/manage-listing/who-will-have-access-to-manage-listing) [NextHow can I change my current plan?chevron-right](https://docs.truecaller.com/truecaller-for-business/account-management-and-billing/how-can-i-change-my-current-plan) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Account Creation | Truecaller for Business In this section, you can get to know all about creating an account with Truecaller Verified Business Caller ID. [How can I create a Truecaller Verified Business Caller ID account?](https://docs.truecaller.com/truecaller-for-business/account-creation/how-can-i-create-a-truecaller-verified-business-caller-id-account) [Verify your email](https://docs.truecaller.com/truecaller-for-business/account-creation/how-can-i-create-a-truecaller-verified-business-caller-id-account/verify-your-email) [Set your password](https://docs.truecaller.com/truecaller-for-business/account-creation/how-can-i-create-a-truecaller-verified-business-caller-id-account/set-your-password) [Logging In](https://docs.truecaller.com/truecaller-for-business/account-creation/how-can-i-create-a-truecaller-verified-business-caller-id-account/logging-in) [PreviousAre there any early access programs I can be a part of?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/are-there-any-early-access-programs-i-can-be-a-part-of) [NextHow can I create a Truecaller Verified Business Caller ID account?chevron-right](https://docs.truecaller.com/truecaller-for-business/account-creation/how-can-i-create-a-truecaller-verified-business-caller-id-account) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Manage Listing | Truecaller for Business Manage Listing is a feature designed to streamline and simplify phone number listing and delisting on the Truecaller for Business console. [PreviousWhat actions can I take on the feature set list page?chevron-left](https://docs.truecaller.com/truecaller-for-business/managing-feature-sets/what-actions-can-i-take-on-the-feature-set-list-page) [NextHow do I list phone numbers using Manage Listing?chevron-right](https://docs.truecaller.com/truecaller-for-business/manage-listing/how-do-i-list-phone-numbers-using-manage-listing) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Does the Verified Business Caller ID work on all telco networks, phones and OS platforms? | Truecaller for Business Yes, Verified Business Caller ID works on all devices that support the Truecaller application, i.e. Android and iOS. It works across all devices within these OS, and it is a network-agnostic solution. [PreviousCan I get a customized Verified Business Caller ID or choose the color of the Caller ID?chevron-left](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/can-i-get-a-customized-verified-business-caller-id-or-choose-the-color-of-the-caller-id) [NextDoes the Verified Business Caller ID work for iOS users?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/does-the-verified-business-caller-id-work-for-ios-users) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Spam Management | Truecaller for Business Get answers to all your queries around how do we manage spam on the Truecaller app. [How is spam calculated on Truecaller?](https://docs.truecaller.com/truecaller-for-business/spam-management/how-is-spam-calculated-on-truecaller) [How does spam detection happen on the Truecaller app?](https://docs.truecaller.com/truecaller-for-business/spam-management/how-does-spam-detection-happen-on-the-truecaller-app) [PreviousWhy am I not able to see roles and permissions on my console?chevron-left](https://docs.truecaller.com/truecaller-for-business/roles-and-permissions/why-am-i-not-able-to-see-roles-and-permissions-on-my-console) [NextHow does spam detection happen on the Truecaller app?chevron-right](https://docs.truecaller.com/truecaller-for-business/spam-management/how-does-spam-detection-happen-on-the-truecaller-app) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Can I get a customized Verified Business Caller ID or choose the color of the Caller ID? | Truecaller for Business * No, the Verified Business Caller ID cannot be customized. * All Verified Business calls are identifiable by a green badge. [PreviousGet to know Truecaller Customer Experience Solutionchevron-left](https://docs.truecaller.com/truecaller-for-business) [NextDoes the Verified Business Caller ID work on all telco networks, phones and OS platforms?chevron-right](https://docs.truecaller.com/truecaller-for-business/get-to-know-truecaller-customer-experience-solution/does-the-verified-business-caller-id-work-on-all-telco-networks-phones-and-os-platforms) Last updated 8 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Managing Feature Sets | Truecaller for Business The Feature Set listing page is your central workspace for managing all day-to-day operations related to your feature sets. You now get a consolidated view where you can quickly access, review, and manage everything in one place, instead of navigating through multiple layers of the organisation structure. From this page, you can: * View all your feature sets in a clean, organised table * See important details like Caller ID type, listed numbers, active features, and last updated information * Perform key actions such as viewing stats, archiving, deleting, or copying the feature set ID * Search and filter feature sets to find what you need faster * Create new feature sets through a simplified, guided workflow This page gives you a faster, more intuitive way to handle your daily tasks, whether you're listing numbers, updating features, or reviewing analytics, ensuring smoother operations with fewer clicks. [PreviousHow can I enable Secure Call for my business?chevron-left](https://docs.truecaller.com/truecaller-for-business/features/secure-calls/how-can-i-enable-secure-call-for-my-business) [NextWhat is the Feature Set listing page and what details can I see here?chevron-right](https://docs.truecaller.com/truecaller-for-business/managing-feature-sets/what-is-the-feature-set-listing-page-and-what-details-can-i-see-here) Last updated 2 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Account Suspension | Truecaller for Business Know all about account suspension and related queries in this section. [What is account suspension?](https://docs.truecaller.com/truecaller-for-business/account-suspension/what-is-account-suspension) [Why has my account been suspended?](https://docs.truecaller.com/truecaller-for-business/account-suspension/why-has-my-account-been-suspended) [Will my subscription get deactivated if my account is suspended?](https://docs.truecaller.com/truecaller-for-business/account-suspension/will-my-subscription-get-deactivated-if-my-account-is-suspended) [PreviousHow will the spam update happen? How will I know which numbers are spam?chevron-left](https://docs.truecaller.com/truecaller-for-business/spam-management/how-will-the-spam-update-happen-how-will-i-know-which-numbers-are-spam) [NextWhat is account suspension?chevron-right](https://docs.truecaller.com/truecaller-for-business/account-suspension/what-is-account-suspension) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Onboarding | Truecaller for Business circle-check Once your account has been created and verified, you are ready to begin setting up your calling operations. In this section, you will get to know all about getting started on the Truecaller for Business console. [1\. Setup your calling operations](https://docs.truecaller.com/truecaller-for-business/onboarding/1.-setup-your-calling-operations) [2\. Add a process to your calling operations](https://docs.truecaller.com/truecaller-for-business/onboarding/2.-add-a-process-to-your-calling-operations) [3\. Configure a feature set](https://docs.truecaller.com/truecaller-for-business/onboarding/3.-configure-a-feature-set) [4\. Setup your Verified Business Caller ID](https://docs.truecaller.com/truecaller-for-business/onboarding/4.-setup-your-verified-business-caller-id) [5\. List your numbers](https://docs.truecaller.com/truecaller-for-business/onboarding/5.-list-your-numbers) [PreviousLogging Inchevron-left](https://docs.truecaller.com/truecaller-for-business/account-creation/how-can-i-create-a-truecaller-verified-business-caller-id-account/logging-in) [Next1\. Setup your calling operationschevron-right](https://docs.truecaller.com/truecaller-for-business/onboarding/1.-setup-your-calling-operations) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Features | Truecaller for Business Get answers to all your queries about the features in Verified Business Caller ID, how to enable them and more in this section. [Verified Business Caller ID](https://docs.truecaller.com/truecaller-for-business/features/verified-business-caller-id) [Priority Caller ID](https://docs.truecaller.com/truecaller-for-business/features/verified-business-caller-id/priority-caller-id) [Business Page](https://docs.truecaller.com/truecaller-for-business/features/business-page) [Call Reason](https://docs.truecaller.com/truecaller-for-business/features/call-reason) [Video Caller ID](https://docs.truecaller.com/truecaller-for-business/features/video-caller-id) [Call Me Back](https://docs.truecaller.com/truecaller-for-business/features/call-me-back) [User Feedback](https://docs.truecaller.com/truecaller-for-business/features/user-feedback) [Analytics](https://docs.truecaller.com/truecaller-for-business/features/analytics) [PreviousWhat happens when I unpublish a configured feature set?chevron-left](https://docs.truecaller.com/truecaller-for-business/onboarding/7.-publish-your-feature-sets/what-happens-when-i-unpublish-a-configured-feature-set) [NextVerified Business Caller IDchevron-right](https://docs.truecaller.com/truecaller-for-business/features/verified-business-caller-id) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # Roles and Permissions | Truecaller for Business Get to know all about the various roles and permissions that you can set for yourself and your team in this section. [What are Roles and Permissions?](https://docs.truecaller.com/truecaller-for-business/roles-and-permissions/what-are-roles-and-permissions) [How will Roles and Permissions benefit me and my business?](https://docs.truecaller.com/truecaller-for-business/roles-and-permissions/how-will-roles-and-permissions-benefit-me-and-my-business) [How can I assign roles and permissions to my team members?](https://docs.truecaller.com/truecaller-for-business/roles-and-permissions/how-can-i-assign-roles-and-permissions-to-my-team-members) [PreviousHow can I check my billing data?chevron-left](https://docs.truecaller.com/truecaller-for-business/account-management-and-billing/how-can-i-check-my-billing-data) [NextWhat are Roles and Permissions?chevron-right](https://docs.truecaller.com/truecaller-for-business/roles-and-permissions/what-are-roles-and-permissions) Last updated 1 year ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon --- # How do I list phone numbers using Manage Listing? | Truecaller for Business 1. From the “Operations” page on your console, navigate to “Manage Listing”, on the top right corner. 2. Select the "List numbers" option from the drop down menu. 3. A right sidebar modal will open with options to select Department, Operations, Process, Subprocess, and Feature Sets for which you wish to list more numbers. 4. Upload your list of numbers as a CSV file. Note that your CSV file should not exceed 2MB. 5. You will see two options for your file - Rewrite and Append. 1. Rewrite: This action will delist your existing numbers from any of the feature sets that you have access to including priority badged numbers and add the list of new numbers uploaded in the CSV. 2. Append: This action will list your new numbers from the CSV along with the existing numbers for your selected feature set. 6. Click the "Publish" button to submit. 7. Numbers will be validated, and successfully formatted numbers will be listed. ![](https://docs.truecaller.com/truecaller-for-business/~gitbook/image?url=https%3A%2F%2F1505116975-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyWoE7a7EzgrlGFIoECsj%252Fuploads%252FXhunSdjUtAL4h9s4KT4F%252FTruecaller%2520for%2520Business%2520%281%29.gif%3Falt%3Dmedia%26token%3D0ce053c1-275b-44fd-8a1f-0832b91a18bc&width=768&dpr=3&quality=100&sign=603292c0&sv=2) [PreviousManage Listingchevron-left](https://docs.truecaller.com/truecaller-for-business/manage-listing) [NextWhat happens when I select Rewrite?chevron-right](https://docs.truecaller.com/truecaller-for-business/manage-listing/what-happens-when-i-select-rewrite) Last updated 7 months ago Was this helpful? Was this helpful? sun-brightdesktopmoon sun-brightdesktopmoon ---