---
updatedAt: 2026-03-19T18:28:24.000Z
agentTools:
  projectIndex: https://developers.miro.com/llms.txt
---

# Reference

A reference with an overview of the arguments of the `miroBoardsPicker.open` method: what they are, what values they accept, and how to pass them when using the method.

Integrating Miro’s BoardsPicker into your website enables site users to collaborate and share ideas with Miro boards in real time. BoardsPicker enables users to embed and share the details of their boards on your website for free, without the need for authentication protocols, such as Open Authorization (OAuth) or APIs.

To get an idea of the possibilities, have a look at the [Embed Miro](https://miro.com/marketplace/category/embed-miro/) section on the [Miro Marketplace](https://miro.com/marketplace).

## BoardsPicker reference

The BoardsPicker component has a core method: `miroBoardsPicker.open`.\
This reference gives an overview of the arguments that the `miroBoardsPicker.open` method can take: what they are, what types and values they accept, what they do, and how to pass them when using the method.

The `miroBoardsPicker.open` method takes a single argument: `options`.\
The `options` object has the following properties:

* [`clientId`](#clientid)
* [`action`](#action)
* [`success`](#success)
* [`cancel`](#cancel)
* [`error`](#error)
* [`iframeContainer`](#iframecontainer)
* [`windowRef`](#windowref)
* [`allowCreateAnonymousBoards`](#allowcreateanonymousboards)
* [`getToken`](#gettoken)

### `clientId`

**(required)**

The unique [**Client ID**](https://developers.miro.com/miro-ea/docs/build-your-first-hello-world-app#step-3-configure-your-app-in-miro) of the app that requests user authorization.\
To obtain an app client ID:

1. In Miro, go to your apps.
2. In the **Created apps** section, click the app that you want to obtain the client ID for.\
   The client ID is displayed in the **App Credentials** section.

Example:

```javascript
clientId: "3074451123581321347"
```

### `action`

**(required)**

Defines the way in which BoardsPicker enables selecting and sharing a board when it's embedded in a website.\
Allowed options:

* [`select`](#select)
* [`access-link`](#access-link)

Example:

```javascript
action: "select", // Or: "access-link"
```

#### `select`

`action: "select"` enables selecting a board to share and embed it on a website.\
If the request is successful, the function passed to the [`success`](#success) property returns JSON-formatted details of the board selected with the BoardsPicker component.

Example response:

```javascript
selectedBoard = {
    "id":"uXjVOD9zD_k=",
    "name":"Demo App",
    "viewLink":"https://miro.com/app/board/uXjVOD9zD_k="
}
```

`id` is the unique identifier of the selected board.

* `name` is the human-friendly name of the board.
* `viewLink` is a URL link to the selected board.\
  You can pass it to an iframe to embed the board on a website.

For more information about the response to a call with `action: "select"`, see [Response for `action: 'select'`](https://developers.miro.com/miro-ea/docs/miro-live-embed-with-boardspicker-registered#response-for-action-select).

#### `access-link`

`action: "access-link"` enables selecting an access level to the embedded board that's being shared.\
The selected access level applies to all users accessing the embedded board, regardless of their individual, specific user access rights.

If `action` is set to `access-link`, the BoardsPicker response includes the same properties that the `select` action type returns, as well as the `accessLink`, `accessLinkPolicy`, and `embedHtml` additional properties:

```javascript
selectedBoard = {
    "id":"uXjVOD9zD_k=",
    "name":"Demo App",
    "viewLink":"https://miro.com/app/board/uXjVOD9zD_k=...",
    "accessLink":"https://miro.com/app/live-embed/...",
    "accessLinkPolicy":"EDIT",
    "embedHtml":"<iframe class=\"miro-embedded-board\" src=\"https://miro.com/app/..."></iframe>"
}
```

`accessLink` defines the URL link pointing to the selected board.

* `accessLinkPolicy` sets the user access level for the shared embedded board.\
  Allowed values, from most to least restricted:
  * `private`
  * `comment`
  * `view`
  * `edit`
* `embedHtml` is an iframe element that enables linking to the selected board so that you can embed it directly into your website.\
  This iframe element must include the `miro-embedded-board` CSS class.

For more information about the response to a call with `action: "access-link"`, see [Response for `action: 'access-link'`](https://developers.miro.com/miro-ea/docs/miro-live-embed-with-boardspicker-registered#response-for-action-access-link).

### `success`

**(required)**

`success` takes a callback function as an argument. The callback executes when a user successfully completes a board selection and sharing operation with BoardsPicker.\
When a user selects a board, and they successfully complete an interaction with BoardsPicker, the callback returns the details of the specified board.

Example:

```javascript
success: function(selectedBoard) {
  console.log(selectedBoard)
},
```

### `cancel`

*(optional)*

`cancel` takes a callback function as an argument. The callback executes when a user cancels the BoardsPicker interaction, without completing the operation.\
When a user cancels the operation, they close the BoardsPicker component without selecting a board.

Example:

```javascript
cancel: function() {
  // Do something
},
```

### `error`

*(optional)*

`error` takes a callback function as an argument. The callback executes when a user cannot successfully complete a board selection and sharing operation with BoardsPicker.\
This scenario can occur when BoardsPicker encounters an issue that prevents users from successfully completing the interaction, and the operation throws an error.

Example:

```javascript
error: function(err) {
  console.log(err)
  // Do something...
},
```

### `iframeContainer`

*(optional)*

`iframeContainer` enables opening BoardsPicker in the specified HTML container element.\
It can take one of the following values:

* The ID of the item containing BoardsPicker.\
  Pass the ID value as a string.
* The instance of the [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) containing BoardsPicker.

ℹ️ Note:

* Define either `iframeContainer`, or `windowRef`.\
  You cannot use both at the same time.

Example:

```javascript
function onClick() {
  miroBoardsPicker.open({
    clientId: '...',
    iframeContainer: 'myContainer', // HTMLElement or item ID.
    // ... Other parameters
  })
}
```

### `windowRef`

*(optional)*

`windowRef` enables opening BoardsPicker in the specified open window instance.\
You first need to open the target window, and then you can set it as a container for BoardsPicker.\
`windowRef` works only if `iframeContainer` isn't used.

ℹ️ Note:

* Define either `iframeContainer`, or `windowRef`.\
  You cannot use both at the same time.

Example:

```javascript
function onClick() {
  // Calculate dimensions and position of the pop-up window.
    const pos = {left, top}
    const size = {width, height}
  
    const windowRef = window.open(
      '',
      '_blank',
 `width=${size.width},height=${size.height},left=${pos.left},top=${pos.top},menubar=0,toolbar=0,location=0,personalbar=0,status=0`
    )
    
  miroBoardsPicker.open({
    clientId: '...',
    windowRef: windowRef, // Provide the reference of the container window.
    // ... Other parameters
  })
}
```

### `allowCreateAnonymousBoards`

*(optional)*

If `allowCreateAnonymousBoards: true`, it allows unregistered users to create and interact with a new temporary Miro board.\
When it's set to `true`, you must also pass a valid access token with [`getToken`](#gettoken).

Example:

```javascript
function onClick() {
  miroBoardsPicker.open({
    clientId: '...', // 1) Put your 'clientId' here.
    action: 'access-link',
    allowCreateAnonymousBoards: true, //2) Enable this option 
    getToken: () => getTokenFromServer(), // Provide token in async way
    success: data => {
      console.log('on success', data)
      document.querySelector('#container').innerHTML = data.embedHtml
    },
    
    error: e => {
      console.log('on error', e)
    },
    
    cancel: () => {
      console.log('on cancel')
    },
    
    windowRef: windowRef, // Link to an open popup window 
  })
}
```

### `getToken`

(required if `allowCreateAnonymousBoards: true`. Otherwise, optional)

When using temporary boards, you must provide a [JSON Web Token (JWT)](https://jwt.io/) from your application’s backend to the BoardsPicker component.

Example:

```javascript
// Type: () => Promise<string>
function getTokenFromServer() {
  //Get JWT token from your server. Read more about JWT https://jwt.io/
  return fetchPost('https://example.com/token-for-integration-with-miro')
}
```

> 🚧
>
> If your website has a [policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy) for blocking [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) information, boards embedded with the [`access-link`](#choose-the-action-type) action type don’t load.\
> To solve the issue, you can override the [`referrerpolicy`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-referrerpolicy) attribute inside the iframe HTML element on your site.
>
> Example:
>
> ```html
> <iframe src="https://miro.com/app/..." referrerpolicy="no-referrer-when-downgrade"></iframe>
> ```

## See also

* [Live Embed with a direct link](https://developers.miro.com/miro-ea/docs/miro-live-embed-with-a-direct-link)
* [Live Embed with BoardsPicker for registered users](https://developers.miro.com/miro-ea/docs/miro-live-embed-with-boardspicker-registered)
* [Live Embed with BoardsPicker for unregistered users](https://developers.miro.com/miro-ea/docs/miro-live-embed-with-boardspicker-unregistered)

# Sibling pages

* [Introduction](https://developers.miro.com/miro-ea/docs/miro-live-embed-introduction.md)
* [Getting started](https://developers.miro.com/miro-ea/docs/getting-started-3.md)
* [How-Tos & tutorials](https://developers.miro.com/miro-ea/docs/embed-tutorials.md)

# What's next

Explore the Live Embed tutorials and start embedding Miro boards.

* [Live Embed tutorials](https://developers.miro.com/miro-ea/docs/embed-tutorials.md)