Skip to main content

Hello everyone,

I am new to the Miro development and have a basic question that I need to be solved once and for all: Do I understand correctly that my Miro app can only do things on the board when it is actively open in the side panel?
For example: If I want to build an app that changes the viewport when an event happens on the board, I can get that event information using webhooks. But if I want to react to this event, I have to send a command to a Web SDK, e.g. via WebSockets. But this WebSDK app is only active when it is open in the side panel. 

Please help me understand this fundamental basic of developing for miro. Thanks a lot!

Hi @LB L,

 

There are various types of Web SDK applications, you can find more details here.

For your use-case, a headless app should work fine and won’t require the app panel to be opened. Note that the Web SDK application runs in the background only after being authorised by a user.

 


Hi and thank you very much!
Using an headless iframe is a very good take for what I try to do, but I am still a bit confused about what the capabilities of it are. 
And ChatGPT is not really helpful, since it always try to do lines like 
 

        miro.board.selection.on('select', (event) => {
console.log('Element auf dem Board ausgewählt:', event);
});

which result in errors like

miro.js:2  Uncaught (in promise) SdkMethodExecutionError: Cannot call the method ".on()" at path "board.selection.on".
  - Cannot read properties of undefined (reading 'on')
    at miro.js:2:424

And simple EventListener like

    window.addEventListener('keydown', (event) => {
if (event.key === 'ArrowRight') {
console.log('Right Arrow pressed');
}

also do not seem to do anything.


Reply