Forum Academy Marketplace Showcase Pricing Features

How to get data from page url's path?

Hi, I have a use-case where I need to load the current user based on some id and that id should come from the current url’s path parameter. Also, this page is not being navigated from some other page and I don’t wish to use url parameter. For example, if I browse to the url:
http://www.<(mydomain)>.io/<(uniqueId)> , I should be able to load the user from database on basis of this uniqueId. Can someone please help ?

Make the receiving page of type user and when using the go to page action send a user to that page of type user. Bubble will handle the rest.

Sorry, didn’t get this point:
Where should I send the user from ? I just want to query the user by an id extracted from the url path.

Example in a text element …. complete it with the url parameter name :grinning:

In a group of type user this would read the url parameter and load it onto the group (provided that the url parameter contains the user’s unique id )

I understand that, but in my case I dont want to get this uniqueId from parameter, but from the url path. For example, if url is: www.domain.com/userid, then I should get the data from DB with this userId.

Hi @anantpathak2614,
if you make the receiving page of type user like @cmarchan advised you, you should be able to get the result you want. Just make sure that your Privacy Rules allow viewing other users’ data.
If you want to make the URL more friendly, you can use slugs for that

1 Like