# Mercury

platforma citește utilizatorii organizației dvs. Mercury prin intermediul MercuryAPIastfel încât să puteți verifica cine are acces.

:::caution
Use a **Read Only** API token, and paste it with its `secret-token:` prefix. the platform sends the token as `Authorization: Bearer <token>`, which matches the form Mercury documents: `Authorization: Bearer secret-token:...`. A **Read and Write** token is refused from any IP address outside the whitelist it requires, and a **Custom** token can only call the scopes granted when it was created, so neither one reliably reaches the users endpoint.
:::

## Prerequisites

- un administrator de pe contul Mercury controlează această permisiune, iar un utilizator fără ea nu vede nici o modalitate de a crea un token - organizația Mercury pe care doriți să o revizuiți. un token este legat de organizația în care este creat, așa că treceți la acea organizație înainte de a deschide setările sale

## Collected Fields

| the platform field | Mercury field                                            | Notes                                                                                                                                                                                                                    |
| ----------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name        | `firstName`, `lastName`                                  | Joined with a space. Falls back to the email address when both are empty                                                                                                                                                 |
| Email       | `email`                                                  |                                                                                                                                                                                                                          |
| Role        | `organizationRole`                                       | `administrator` becomes Administrator, `bookkeeper` becomes Bookkeeper, `customUser` becomes Custom User, `cardOnlyUser` becomes Card Only User, and `employee` becomes Employee. An unrecognized value is kept verbatim |
| Admin       | `organizationRole`                                       | Flagged as an administrator when `organizationRole` is `administrator`                                                                                                                                                   |
| Status      |  |                                                                                                                                                                                                                          |
| MFA         |  |                                                                                                                                                                                                                          |
| Last login  |  |                                                                                                                                                                                                                          |
| External ID | `userId`                                                 | Stable identifier used to track the account across reviews                                                                                                                                                               |
| Created at  |  |                                                                                                                                                                                                                          |

Mercury returnează fiecare membru al organizației pe un singur punct final. platforma trece o înregistrare care ajunge fără o adresă de e-mail.

## Pasul 1: Creați un tokenAPIdoar pentru citire

1. In [Mercury](https://app.mercury.com/settings/tokens), click your organization at the top left, click **All Settings**, and open **Tokens** in the left navigation.
2. Click **Create an API Token**, enter a **Nickname** such as `Probo Access Review`, set **Permissions** to **Read Only**, then click **Create Token**. A **Read Only** token can fetch all available data on the account and requires no IP whitelist.
3. Copy the token, including its `secret-token:` prefix, and store it securely. Mercury does not show it again once the dialog closes.

## Step 2: Connect in the platform

1. În platformă, mergeți la **Access Reviews** > **Sources** > **Add Source**. 2. Găsiți **Mercury**, faceți clic pe **APIKey**, lipiți tokenul și faceți clic pe **Connect**.

Punctul final al utilizatorilor Mercury nu poartă numele organizației, astfel încât sursa păstrează numele generic **Mercury**. platforma atrage utilizatorii organizației în campaniile dvs.

## Troubleshooting

- **Token rejected.** Paste the token with its `secret-token:` prefix, since the platform sends it as `Authorization: Bearer <token>`. A sandbox token is rejected as well: the platform calls `api.mercury.com`, and a token created in the sandbox belongs to the separate `api-sandbox.mercury.com` environment.
- **The Tokens page offers no way to create a token.** The signed-in user does not hold the permission. An admin on the Mercury account can grant it or create the token instead.
- **No users appear, or the wrong ones do.** A token is bound to the organization it was created in, so create it from the **All Settings** > **Tokens** page of the organization you want to review. A **Custom** token also reaches only the scopes granted at creation, and those cannot be edited afterwards.
- **The source stops syncing after a quiet period.** Mercury deletes a token that goes unused for 45 days and emails account admins seven days beforehand. Create a new token and reconnect the source.
