Using Micro Web SDK via iframe

  • 18 December 2023
  • 1 reply


Hello! Can I use Miro Web SDK if I embed my boards via iframe to my application? (I connected board as here Live Embed with BoardsPicker for registered users (

I want to do that:

const item = await miro.board.get({ id: id })

await miro.board.viewport.zoomTo(item)

but I don’t understand how to get miro object from iframe in my application.

I tried to do that:
document.getElementsByClassName('miro-embedded-board')[0].contentWindow.miro, but I get error: Uncaught DOMException: Failed to read a named property 'miro' from 'Window': Blocked a frame with origin “https://my-link” from accessing a cross-origin frame.
    at HTMLDocument.<anonymous>


1 reply


Hey Anatoly, thank you for reaching out us. By default it is not possible to access iframe’s JavaScript scope if the source has a different origin. It would be a huge security leak if you could do this.

If you’d like to have a Miro board loaded and focused on a specific widget from the start, you can you the `moveToWidget` parameter in the URL:{board_id}/?moveToWidget={item_id}

More about the parameter you can find in documentation: