How to get current thunkableX webAPP URL in browser?

Hi all,
I have a project to let the user to use the webAPP, but there is privacy issue.
My Idea is to give my user the dynamic URL with appended the secret code after the thunkable URL.

For example:
My original webAPP URL: thunkablecompanion
“thunkable.site/web-build/index.html?webAppId=U4yrhrBoQ”

Now I want to give the user the URL:

“thunkable.site/web-build/index.html?webAppId=U4yrhrBoQ&ID=99999999”
ID=99999999 → is the number I create in other program and each time or each user get different ID. The ID is used for login.

I test the URL like this, the webAPP work fine even if append other text by &…

Now I got the problem is that I can’t get the current browser URL inside the APP.

How to get current URL inside the APP??

I search the topic that,【open link】function could do some javascript ,but only in new window.
For example: javascript to get the URL information
javascript:(function(){const parsedUrl = new URL(window.location.href);
var a=parsedUrl.searchParams.get(“ID”);
alert(a);})()

This javascript work well in Web.

But in current thunakable webAPP, I still can’t get current URL.

Is there possible function like 【open link】 to perform javascript but not in another new webpage?
Or just function could run the javascript in the same thunkable WebAPP URL?

Thanks a lot!

1 Like

You can of course interact between your app and the webApp html if you are the owner of the page.

You can use the web-viewer extension

Thanks muneer, I had read the reference and learned a lot about Thunkable X and Web communication.

However, my question still be there.
What I need is to communicate thunkableX’s web itself.

Thant means I want thunkableX to communicate it’s 【Mobile web app】 URL or 【Responsive web app】.
Since I can’t not own the thunkabeX web, I can’t applied [thunkable/webviewer-extension] solution.

I think the solution I need is some function to perform JS on the ThunkableX Responsive web app itself.

Is it possible?

Thanks your help.

1 Like

I wrote JS code but I didn’t get what you mean to see if I can help

I change another way to ask. Hope it will be more clear.

Can we give a start value to thunkableX (mobile web app) when start ?
(the value is not contained inside the APP)
(the value is given outside the APP)

Therefore, my original article is the solution I try to use →
Just want to pass the start value by append the value after the URL of thunkableX ( &…)
But the key step is that the thunkableX APP must have the function to get it’s own current URL.

For example: My thunkableX web APP’s URL is like this:
“thunkable.site/web-build/index.html?webAppId=U4yrhrBoQ”

But is try to append the start value I need by just append the value after the URL:
“thunkable.site/web-build/index.html?webAppId=U4yrhrBoQ&ID=[value I want to append]”

Then the last step is try to figure out how to perform function or javascript to let ThunkableX webAPP to scrab it’s current URL and get the start value from it.

Thanks for your patient and help.