---
updatedAt: 2026-03-19T19:39:12.000Z
agentTools:
  projectIndex: https://developers.miro.com/llms.txt
---

# Attention

**<span><img alt="Experimental feature" src="https://files.readme.io/4598fa6-experimental-flask-color.svg" width="24" ></span> Experimental**

`attention` is the namespace that groups methods that apps can use to focus board attention on specific online users.
Through `miro.board.collaboration.attention`, apps can access methods to:

* Start following another user on the board.
* Make a list of users follow another specified user on the board.
* Bring a list of users to the current user on the board.
* Stop following another user on the board.
* Stop a list of users from following a specified user on the board.
* Check if a user is already following another user on the board.
* Get details about the user that is currently being followed on the board.

When a user follows another user on the board, the follower sees the same viewport as the user they are following. This can be convenient in a scenario where a user wants to view or participate in another user's actions on the board. For example, during a presentation; or when a moderator wishes to check a user's work on the board.

To make the feature available on a board, the follower needs to install a dedicated app that manages attention.

* [follow](https://developers.miro.com/miro-ea/docs/websdk-reference-attention#follow): initiates the process of following a specified online user(s), referred to as the followed user.
* [unfollow](https://developers.miro.com/miro-ea/docs/websdk-reference-attention#unfollow): is used to stop a user(s) from following another user.
* [isFollowing](https://developers.miro.com/miro-ea/docs/websdk-reference-attention#isfollowing): checks whether the current user is already following another user on the board.
* [getFollowedUser](https://developers.miro.com/miro-ea/docs/websdk-reference-attention#getfolloweduser): if a user is following another user, the method returns the followed user details.

## Methods

### follow(...)

<pre class="sdk-reference-type">(followee: <a href="#onlineuserinfo" title="OnlineUserInfo">OnlineUserInfo</a>, options?: <a href="#followusersessionsoptions" title="FollowUserSessionsOptions">FollowUserSessionsOptions</a>) =&gt; Promise&lt;void&gt;</pre>

##### 🚦 Rate limit: [Level 1](https://developers.miro.com/docs/rate-limiting "1")

**<span><img alt="Experimental feature" src="https://files.readme.io/4598fa6-experimental-flask-color.svg" width="24" ></span> Experimental**

The `follow` method is part of the `miro.board.collaboration.attention` namespace. It initiates the process of following a specified online user, referred to as the *followed user*.

Here's an example of how to use this method:

```js
await miro.board.collaboration.attention.follow(followedUser, sessionOptions);
```

Typically, the user who initiates the following is considered the *follower*. However, when `sessionOptions` are provided, the followers are determined by the `sessionOptions`.

The `sessionOptions` parameter can include an array of `followers`. This allows facilitators to create a custom list of users who will follow the specified `followee` user. All `followers` should be in a collaboration session initiated by this app.

ℹ️ Note:

* Users cannot follow themselves: a user cannot be both the follower and the followed user simultaneously.
* If the promise doesn't return within 3 seconds, the method times out.
* An error occurs if the `followers` list contains the initiating `follower` or if any listed `followers` are not part of the collaboration session.

To start a following session, a dedicated *attention manager app* must be installed. This app is responsible for managing the collaboration session and ensuring that all followers are part of the session.

Follow example:

```typescript
// Get current online users.
const onlineUsers = await miro.board.getOnlineUsers();

// Retrieve the user that you want to follow.
const followedUser = onlineUsers.find((user) => user.name.includes("Sara"));

// The current user (follower) starts following the user called "Sara" (followed user or followee).
await miro.board.collaboration.attention.follow(followedUser);
```

Initiate a following session for a group of users to collectively follow a specific user:

```typescript
// Get current online users.
const onlineUsers = await miro.board.getOnlineUsers();

// Retrieve the user that you want to follow.
const followedUser = onlineUsers.find((user) => user.name.includes("Sara"));

// Specify the followers.
const followers = onlineUsers.filter(
  (user) => user.name.includes("John") || user.name.includes("Alice")
);

// John and Alice (followers) are set to follow Sara (followed user or followee).
// Note: All followers must be in a collaboration session.
await miro.board.collaboration.attention.follow(followedUser, { followers });
```

Bring several users to the current user example (set of users will follow current user):

```typescript
const currentUser = await miro.board.getUserInfo(); // Get the current user.
const onlineUsers = await miro.board.getOnlineUsers();

// The current user (follower) starts a following session.
// John and Alice, will follow the current user.
const followers = onlineUsers.filter(
  (user) => user.name.includes("John") || user.name.includes("Alice")
);

// Note: All followers must be in a collaboration session.
await miro.board.collaboration.attention.follow(currentUser, { followers });
```

***

### unfollow(...)

<pre class="sdk-reference-type">(options?: <a href="#unfollowusersessionsoptions" title="UnfollowUserSessionsOptions">UnfollowUserSessionsOptions</a>) =&gt; Promise&lt;void&gt;</pre>

##### 🚦 Rate limit: [Level 1](https://developers.miro.com/docs/rate-limiting "1")

**<span><img alt="Experimental feature" src="https://files.readme.io/4598fa6-experimental-flask-color.svg" width="24" ></span> Experimental**

The `unfollow` method is used to stop a user from following another user. If a user is currently following another user, invoking this method will stop the following session. If there's no following session in progress, the method [returns an error](https://developers.miro.com/miro-ea/docs/web-sdk-error-handling#inputValidation).

Before invoking `unfollow`, check if a following session is in progress by running `isFollowing`.

The `unfollow` method includes support for an additional optional `sessionOptions` parameter, which enhances its functionality:

* You can include an array of `followers` and `followee` in the `sessionOptions` parameter. This provides more flexibility and control over the unfollowing process.

* An error will not occur if the `followee` is included in the `followers` array or if there is no ongoing following session. This ensures a smoother handling of the unfollow operation, preventing disruptions in the execution flow.

* If the `sessionOptions` parameter is provided, the unfollow operation will be executed **only** for the specified list of `followers` and `followee`, not the current user. This allows developers to tailor the unfollow action to a specific set of users, offering a more customized and targeted approach.

However, an error will occur if some of the followers are not in a collaboration session. It's important to ensure that all followers are in a collaboration session before attempting to unfollow.

Example of unfollowing without specifying the followers:

```typescript
// Get the current user.
const currentUser = await miro.board.getUserInfo();

// The current user initiates the unfollow operation.
await miro.board.collaboration.attention.unfollow();
```

Example of unfollowing with specifying the followers:

```typescript
// Get the current user.
const currentUser = await miro.board.getUserInfo();

// Example with specifying followers:
const followers = onlineUsers.filter(
  (user) => user.name.includes("John") || user.name.includes("Alice")
);

// The current user initiates the unfollow operation for John and Alice.
// The specified followers will stop following the followee (if they are following).
// Each follower should be in collaboration session, otherwise error will occur.
await miro.board.collaboration.attention.unfollow({
  followers,
  followee: currentUser,
});
```

***

### isFollowing(...)

<pre class="sdk-reference-type">() =&gt; Promise&lt;boolean&gt;</pre>

##### 🚦 Rate limit: [Level 1](https://developers.miro.com/docs/rate-limiting "1")

**<span><img alt="Experimental feature" src="https://files.readme.io/4598fa6-experimental-flask-color.svg" width="24" ></span> Experimental**

Checks whether the current user is already following another user on the board.

* If the user is following another user, the method returns `true`.
* Otherwise, it returns `false`.

Example:

```typescript
// Check if the current user is following another user.
const isFollowing = await miro.board.experimental.attention.isFollowing();

// Get currently online users.
const onlineUsers = await miro.board.getOnlineUsers();

// You can implement custom logic to return the user object
// that you want to assign to the follower as a followed user.
const followedUser = onlineUsers.find((user) => user.name.contains('Sara'));

// In case the session starter is already following a user other than "Sara":
if (isFollowing) {
  // Get the details of the current followed user.
  const currentFollowedUser = await miro.board.experimental.attention.getFollowedUser();

  if (currentFollowedUser.id !== followedUser.id) {
    // Unfollow the current followed user.
    await miro.board.experimental.attention.unfollow();
  }
}

// Start following the user called "Sara".
await miro.board.experimental.attention.follow(followedUser);
```

***

### getFollowedUser(...)

<pre class="sdk-reference-type">() =&gt; Promise&lt;<a href="#onlineuserinfo" title="OnlineUserInfo">OnlineUserInfo</a>&gt;</pre>

##### 🚦 Rate limit: [Level 1](https://developers.miro.com/docs/rate-limiting "1")

**<span><img alt="Experimental feature" src="https://files.readme.io/4598fa6-experimental-flask-color.svg" width="24" ></span> Experimental**

If a user is following another user, the method returns the followed user details.
If there's no following session in progress, the method [returns an error](https://developers.miro.com/miro-ea/docs/web-sdk-error-handling#inputValidation).

Before invoking [`getFollowedUser`](https://developers.miro.com/miro-ea/docs/websdk-reference-attention#getFollowedUser), check if a following session is in progress by running [`isFollowing`](https://developers.miro.com/miro-ea/docs/websdk-reference-attention#isFollowing).

Example:

```typescript
// Check if the current user is following another user.
const isFollowing = await miro.board.experimental.attention.isFollowing();

// Get currently online users.
const onlineUsers = await miro.board.getOnlineUsers();

// You can implement custom logic to return the user object
// that you want to assign to the follower as a followed user.
const followedUser = onlineUsers.find((user) => user.name.contains('Sara'));

// In case the session starter is already following a user other than "Sara":
if (isFollowing) {
  // Get the details of the current followed user.
  const currentFollowedUser = await miro.board.experimental.attention.getFollowedUser();

  if (currentFollowedUser.id !== followedUser.id) {
    // Unfollow the current followed user.
    await miro.board.experimental.attention.unfollow();
  }
}

// Start following the user called "Sara".
await miro.board.experimental.attention.follow(followedUser);
```

***

### Type definitions

##### OnlineUserInfo

<pre class="sdk-reference-type">{ <a href="#id" <a href="#title" title="title">title</a>="id">id</a>: string; name: string }</pre>

##### FollowUserSessionsOptions

<pre class="sdk-reference-type">{ followers?: Array&lt;<a href="#onlineuserinfo" title="OnlineUserInfo">OnlineUserInfo</a>&gt; }</pre>

##### UnfollowUserSessionsOptions

<pre class="sdk-reference-type">{ followee: <a href="#onlineuserinfo" title="OnlineUserInfo">OnlineUserInfo</a>; followers: Array&lt;<a href="#onlineuserinfo" title="OnlineUserInfo">OnlineUserInfo</a>&gt; }</pre>

## All properties

<table><tr><th>Property</th><th>Type</th></tr>
<tr>
  <td><code>follow(...)</code></td>
  <td>
    <pre class="sdk-reference-type">(followee: <a href="#onlineuserinfo" title="OnlineUserInfo">OnlineUserInfo</a>, options?: <a href="#followusersessionsoptions" title="FollowUserSessionsOptions">FollowUserSessionsOptions</a>) =&gt; Promise&lt;void&gt;</pre>
  </td>
</tr>
<tr>
  <td><code>getFollowedUser(...)</code></td>
  <td>
    <pre class="sdk-reference-type">() =&gt; Promise&lt;<a href="#onlineuserinfo" title="OnlineUserInfo">OnlineUserInfo</a>&gt;</pre>
  </td>
</tr>
<tr>
  <td><code>isFollowing(...)</code></td>
  <td>
    <pre class="sdk-reference-type">() =&gt; Promise&lt;boolean&gt;</pre>
  </td>
</tr>
<tr>
  <td><code>unfollow(...)</code></td>
  <td>
    <pre class="sdk-reference-type">(options?: <a href="#unfollowusersessionsoptions" title="UnfollowUserSessionsOptions">UnfollowUserSessionsOptions</a>) =&gt; Promise&lt;void&gt;</pre>
  </td>
</tr></table>

# Sibling pages

* [Interact with boards and items](https://developers.miro.com/miro-ea/docs/websdk-reference-interact-with-boards-and-items.md)
* [Rate limiting](https://developers.miro.com/miro-ea/docs/websdk-reference-rate-limiting.md)
* [Error handling](https://developers.miro.com/miro-ea/docs/websdk-reference-error-handling.md)
* [Board](https://developers.miro.com/miro-ea/docs/websdk-reference-board.md)
* [Card](https://developers.miro.com/miro-ea/docs/websdk-reference-card.md)
* [Board UI](https://developers.miro.com/miro-ea/docs/websdk-reference-ui.md)
* [Viewport](https://developers.miro.com/miro-ea/docs/websdk-reference-viewport.md)
* [Notifications](https://developers.miro.com/miro-ea/docs/websdk-reference-notifications.md)
* [App card](https://developers.miro.com/miro-ea/docs/websdk-reference-app-card.md)
* [Experimental](https://developers.miro.com/miro-ea/docs/websdk-reference-experimental.md)
* [Realtime Events](https://developers.miro.com/miro-ea/docs/websdk-reference-events.md)
* [Tag](https://developers.miro.com/miro-ea/docs/websdk-reference-tag.md)
* [Custom Action Management](https://developers.miro.com/miro-ea/docs/websdk-reference-custom-action-management.md)
* [Shape](https://developers.miro.com/miro-ea/docs/websdk-reference-shape.md)
* [Frame](https://developers.miro.com/miro-ea/docs/websdk-reference-frame.md)
* [Image](https://developers.miro.com/miro-ea/docs/websdk-reference-image.md)
* [Sticky Note](https://developers.miro.com/miro-ea/docs/websdk-reference-sticky-note.md)
* [Shape experimental](https://developers.miro.com/miro-ea/docs/websdk-reference-shape-experimental.md)
* [Embed](https://developers.miro.com/miro-ea/docs/websdk-reference-embed.md)
* [Connector](https://developers.miro.com/miro-ea/docs/websdk-reference-connector.md)
* [Unsupported](https://developers.miro.com/miro-ea/docs/websdk-reference-unsupported.md)
* [Mindmap Node](https://developers.miro.com/miro-ea/docs/websdk-reference-mindmap-node.md)
* [Preview](https://developers.miro.com/miro-ea/docs/websdk-reference-preview.md)
* [Text](https://developers.miro.com/miro-ea/docs/websdk-reference-text.md)
* [Storage collection](https://developers.miro.com/miro-ea/docs/websdk-reference-collection.md)
* [Storage](https://developers.miro.com/miro-ea/docs/websdk-reference-storage.md)
* [Collaboration](https://developers.miro.com/miro-ea/docs/websdk-reference-collaboration.md)
* [Session](https://developers.miro.com/miro-ea/docs/websdk-reference-session.md)
* [Group](https://developers.miro.com/miro-ea/docs/websdk-reference-group.md)
* [History](https://developers.miro.com/miro-ea/docs/websdk-reference-history.md)
* [Tools](https://developers.miro.com/miro-ea/docs/websdk-reference-tools.md)