How to add deep link?

How to add deek link into my website (HTML)?

let req_nonce = 123456789598;  // random number of length 8 to 64 characters
window.location = `truecallersdk://truesdk/web_verify?requestNonce=${req_nonce}&partnerKey=YOUR_APP_KEY&partnerName=YOUR_APP_NAME&lang=LANGUAGE_LOCALE&title=TITLE_STRING_OPTION&skipOption=FOOTER_CTA_STRING`;
}, 600);

I dont understand what you mean by this

1 Like

I don’t really understand the question either. But I found this link when I googled the code. It might help someone answer the question.https://medium.com/@hardychugh34/adding-truecaller-login-to-your-web-app-5e15e2c14ad0

1 Like

A deep link is basically a link that leads to information about a certain subject/website (like a google search).

Depending on what service you are using, you will have to usually generate a link that includes a search query containing whatever you are “searching”.

Adding a deep link is essentially the same as adding a normal a tag in HTML. From the looks of it, you are using JavaScript.

A simple example could be as the following:

const req_nonce = 123456789598; // random number of length 8 to 64 characters
const LINK_URL = `truecallersdk://truesdk/web_verify?requestNonce=${req_nonce}&partnerKey=YOUR_APP_KEY&partnerName=YOUR_APP_NAME&lang=LANGUAGE_LOCALE&title=TITLE_STRING_OPTION&skipOption=FOOTER_CTA_STRING` ;
const a = document.createElement("a");
a.href = LINK_URL;
a.textContent = "IDK what this is, but click it!"; // Probably best to change this XD. This will be the text that shows up to the user as a link.
document.body.appendChild(a); //You probably want to append this to a different element. use "document.getElementById("ID")" and replace "ID" with the id of the element.
2 Likes

You literally just used a “deep link” (in a sense).

Ok, maybe not “used” a deep link, but you googled information on a topic which, if you linked the google search URL then it could be considered a deep link.

2 Likes

It was deep link lol. He said Deek Link

I am confused to how to add a deep link in a webpage built for mobile screen,

Can anyone suggest me a template for it, like where to add the code in html ?

When I run this code it should open a popup from truecaller mobile app but instead it take me to chrome ://truecallersdk…

This deep link is for opening a popup in a app named truecaller to verify a user.

Sorry for typos’ can you suggest the template ?

That was a template, I just copied the URL. Change LINK_URL if your address is incorrect. To add it to HTML, you would have to re-write your code in your question because that is for JavaScript.

In fact, what’s even better is if you make an a tag in HTML, give it an ID of whatever you want, and post this right before the end of the end body tag in HTML:

<script>
let req_nonce = 123456789;
const LINK_URL = `truecallersdk://truesdk/web_verify?requestNonce=${req_nonce}&partnerKey=YOUR_APP_KEY&partnerName=YOUR_APP_NAME&lang=LANGUAGE_LOCALE&title=TITLE_STRING_OPTION&skipOption=FOOTER_CTA_STRING`;
const a = document.getElementById("A_ID");
a.href = LINK_URL;
</script>

One thing you will have to change, is the “A_ID” in the document.getElementById() function; change it to the id of the a tag that you want to insert the link into.
You will also have to change the URL and the req_nonce because I can see these are just examples. The rest is up to you to gather information, but this is how to add a deep link into your HTML.

3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.