App URL
The app URL isn’t technically a widget, but it talks to the platform in exactly the same way. We cover the basics of this page in Install process, so here we focus on the events you can send back to the platform with postMessage.

Available query parameters
Section titled “Available query parameters”These are the parameters we send along with the URL, for example https://example.app?action=open.
action:open,installoruninstall.authtoken: only sent if the app is installed.admin_id: the unique identifier of the administration.chain_id:0by default, unless the administration is part of a chain.app_id: the unique identifier of your app.lang: the user’s language.
Events
Section titled “Events”This widget supports only the height event. This is the complete event object:
{ height: 300 // height in pixels}Set the height of the widget
Section titled “Set the height of the widget”You’ll want to avoid your widget showing a scrollbar or a lot of white space. To fix this, set the widget height by sending it in an event:
window.top.postMessage({ height: 300 // height in pixels}, '*') ;Update the height automatically
Section titled “Update the height automatically”Sometimes a fixed height doesn’t work, because the height depends on the content. In that case you can do something like this, so the widget height updates whenever the size of your application changes:
const updateSize = () => {
window.top.postMessage({ height: document.body.scrollHeight // height in pixels }, '*') ;
}
updateSize() ; // set the height for the first time
// watch for size changes and update the height when they happen// create an observer instance to check if the screen changesconst resizeObserver = new ResizeObserver((entries) => { updateSize() ;})
// start observing a DOM noderesizeObserver.observe(document.body)Our basic apps already include this feature. You’ll find them in the tutorials section.