Specific links -> PROD vs STG

How do I get the environment specific URLs for my apps? I want to give the STG app to my QA and the PROD app to my customer. I am talking about different URLs for the same app.

@victoria Some help here pls?

Hi @Sarat :slight_smile: Thanks for summoning me.

Would adding ?_environment=production, for example, at the end of your app URL work for you?

https://docs.retool.com/docs/url-query-parameters#built-in-url-query-parameters

I tried doing this but retool redirects the user to login and then when they come back to the original URL, the param is lost. Login always directs the user to PROD.

@Sarat is this in the Retool Mobile native app? You should be able to change environments in the side drawer when you are viewing an app which includes a resource that has multiple environments configured.

However, keep in mind that switching to a non-production environment is only possible for editor users.

In web preview mode, there should be a picker in the lower left.

Hello! No this is on mobile web.
I have found that the environment can be changed only after the first screen is shown. This means that I will have to change my api and nav logic.
Does my query make sense?

Team,
Any update on this? Will someone give me a solution please?

Hey @Sarat! Thank you for your replies here :slight_smile:

When you say Mobile Web, do you mean Retool's responsive mobile view

or building a Retool Mobile app on the web?

And could you clarify the behavior happening when you say "environment can be changed only after the first screen is shown”? Basically, you can't manually change the environment until you load the app?

Hi - I am running into this issue now. Once an app is published, I can't ever see the staging version, even if I use the ?_environment=staging var. This is for Retool Mobile app on the web (not native mobile app, or desktop web). Need some help on this!

Hi @unnickrunco! Hmm, this should work :thinking: To double check, you can see your components in prod but not staging? What if you manually change the environment by clicking the tag in the bottom left?

In the web view on the phone, that option doesn't seem to exist.

Sorry about that, seems like we made it hard to access the env switcher in cases where you land directly on a mobile app.

You should be able to access the env switcher by navigating to /mobile first, searching for your app in the apps list, and then opening the hamburger menu once you're inside your app.

1 Like