# Install the Figma plugin

Add the Mestra plugin to the Figma desktop app and sign in.

The Mestra plugin runs inside Figma. This page covers the install, sign-in and updates.

In the plugin, brands are called **Centres** and flagged formats are marked **Needs a look**. On the web they are **Brands** and **To check**. They are the same things.

## Requirements

| Item            | What you need                                                                  |
| --------------- | ------------------------------------------------------------------------------ |
| Figma           | The Figma desktop app (current version).                                       |
| Mestra account  | An organisation, with you as an editor or owner. A viewer can't connect apps.  |
| The plugin file | `mestra-figma.zip`                                                             |
| Network         | Access to `https://app.withmestra.com`. The plugin contacts only that address. |

## Install

The plugin isn't in the Figma Community yet. You download it from the Mestra web app.

1. In the Mestra web app, open **Organisation** > **Apps** and select **Download for Figma (.zip)**. Anyone in your organisation can download it. The page shows the current version. Unzip the file.
2. In the Figma desktop app, choose **Plugins → Development → Import plugin from manifest**. Select the `manifest.json` from the unzipped folder.
3. Open **Plugins → Development → Mestra**.

## Sign in

1. In the plugin, press **Sign in**.
2. The plugin shows **Your code** and opens your browser at the Mestra **Connect** page. If the browser can't open, the plugin shows a link to open yourself.
3. Check that the code matches. Choose your organisation, then press **Allow**.
4. The plugin shows **Signed in as** your name and organisation.

The code lasts 10 minutes. If it expires, sign in again. **Sign out** in the plugin revokes the sign-in.

## Permissions

| Permission                                   | Why                                                                                           |
| -------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Network to `https://app.withmestra.com` only | Mestra plans layouts with its own service, where you also sign in. Nothing else is contacted. |
| Document access (dynamic-page)               | To read your master and build the new frames in your file                                     |

Owners can see and sign out every Figma sign-in on the **Apps** page in the web app. Everyone else sees only their own.

## Updating

There is no update button in the plugin. We email organisation owners when a new version is available. Download the new zip from the **Apps** page, then install the new file the same way.

## Troubleshooting

| Symptom                                  | Cause                                       | Fix                                                                                                             |
| ---------------------------------------- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| "Your role (viewer) can't connect apps." | You're a viewer in that organisation.       | Ask an owner to change your role. See [Invite your team](https://withmestra.com/docs/how-to/invite-your-team/). |
| "The code expired. Sign in again."       | The 10-minute code ran out.                 | Press **Sign in** again.                                                                                        |
| "Sign-in was cancelled in the browser."  | **Cancel** was pressed on the Connect page. | Press **Sign in** and choose **Allow**.                                                                         |
| "You're signed out. Sign in again."      | The sign-in was revoked or ended.           | Press **Sign in** again.                                                                                        |
| "Couldn't sign in. Try again."           | The sign-in didn't complete.                | Try again. If it keeps happening, contact [Support](https://withmestra.com/docs/support/).                      |

Still stuck? See [Troubleshooting](https://withmestra.com/docs/troubleshooting/) or [Support](https://withmestra.com/docs/support/).
