When an app is installed and if the default app proxy URL is occupied by another app, Shopify automatically assigns a different app proxy URL to the app. Similarly the merchant may alter the URL as per their own preference.
For e.g. the app’s proxy URL is /a/myapp. But if that path is not free on a store, Shopify assigns /a/myapp-1 to the app on that store.
There is no way for an app to know the updated URL programatically, expect for making random hit and trial. This has been the scenario so far.
Recently I have noticed that the current app proxy URL is displayed at the path /admin/app_installations/app/app-handle in Shopify Admin. If an app makes an AJAX request to this page and parses its HTML source code, it shall be able to get the updated App proxy URL and display the same to customers.
My question is, would this violate any Terms of Service or Policy? I emailed the Partner Support Team, but they couldn’t answer this. In fact, they recommended that I post it here.