Comment on page
Initialisation
You can perform user verification via Truecaller at any touchpoint in your journey (for example - login, registration, checkout, verification, etc.).
.png?alt=media&token=5c5c8fe0-6efd-4356-bb9b-e22f6d002d28)
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.

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 :
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