Getting the Bubble app id?

Does anyone know if it’s possible to get the app ID (basically the subdomain portion of in an expression without parsing the URL?

Parsing would be straightforward, but I want to make sure I’m not overlooking a built-in way of doing it.



Probably an infrequent need, but just in case someone finds it useful, here’s the regular expression I used…


This is in my Header reusable element, so I can now access the app id from any page containing the header. (Or in the case of a custom domain, it’ll contain everything up to the first dot in the domain name.)

It wasn’t extensively tested, but it works for my needs.