Initialisation

You can perform user verification via Truecaller at any touchpoint in your journey (for example - login, registration, checkout, verification, etc.).

To initiate the user verification, you need to trigger a deep link upon any user action, in the format mentioned below :

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";

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.

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.

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 :

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 :

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 :

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:

The ctaPrefix parameter lets you choose the prefix string for the contextual text on the CTA button you want to show

The btnShape parameter lets you choose the shape of the CTA button you want to show

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 :

ctaColor=%23f75d34

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 :

ctaTextColor=%23f75d34

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 :

privacyUrl="<<YOUR_PRIVACY_POLICY_LINK>>"

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 :

termsUrl="<<YOUR_TERMS_OF_SERVICE_LINK>>"

"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.

TTL based auto dismiss functionality would work if the end-user is having Truecaller app v13.24.5 or above

Last updated