# Better Stack

Probo reads the members of one Better Stack team through the Uptime API so you can review who has access.

:::caution
Create a **Global API token** in **Better Stack** > **API tokens** and enter the **Team Name** of the team you are reviewing. The team members endpoint requires that name when a global token calls it. The **Team-based tokens** tab holds per-team tokens instead: an **Uptime API token**, documented for Uptime resources, and a **Telemetry API token**, documented for Telemetry resources including Errors rather than for the Uptime API endpoint Probo reads. Better Stack documents no prefix or format for any of them, so check which section a token came from instead of reading its value.
:::

## Prerequisites

- Probo organization administrator access
- The **Admin** role in Better Stack. Only Admins can edit API tokens, and a Team lead can only view them
- The **Team Name** of the team Probo should review, which the Connect dialog asks for alongside the token. Better Stack lists your teams at **Settings** > **Teams**. Enter the name exactly as Better Stack spells it

## Collected Fields

| Probo field | Better Stack field                                       | Notes                                                                                                                                                                                                                                     |
| ----------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name        | `first_name`, `last_name`                                | Probo joins the two into one name and drops a missing part. A pending invitation carries neither, so the name stays empty                                                                                                                 |
| Email       | `email`                                                  | Probo skips a record that comes back without an email address                                                                                                                                                                             |
| Role        | `role`                                                   | Probo shows `admin`, `billing_admin`, `team_lead`, `responder` and `member` as Admin, Billing admin, Team lead, Responder and Member. Any other value, including `custom`, appears as returned. A record with no role is left without one |
| Admin       | `role`                                                   | Flagged as an administrator when `role` is `admin` or `team_lead`. `billing_admin` is billing only and is not flagged, and neither is a custom role                                                                                       |
| Status      | `type`                                                   | Probo lists `team_member` as active and `team_member_invitation` as inactive. Any other type leaves the status unknown                                                                                                                    |
| MFA         |  |                                                                                                                                                                                                                                           |
| Last login  |  |                                                                                                                                                                                                                                           |
| External ID | `id`                                                     | Stable identifier used to track the account across reviews                                                                                                                                                                                |
| Created at  | `created_at`                                             | When the member joined the team. Probo falls back to `invited_at` when `created_at` is missing, as on a pending invitation                                                                                                                |

Probo lists members who have been invited but have not yet accepted alongside confirmed members, marked inactive. The role Better Stack returns is the one the member holds in the team you named, not in any other team the same person belongs to.

## Step 1: Create a Global API Token

![Creating a Global API token in the Better Stack API tokens settings](/docs/access-review/better-stack-create-api-key.webp)

1. In [Better Stack](https://betterstack.com/settings/global-api-tokens), signed in as an **Admin**, go to **API tokens** and find the **Global API tokens** section. A global token is valid across all of your teams, which is why the team members endpoint takes a team name.
2. Enter a **Token name** (e.g. `Probo Access Review`), leave the permission set to **Read & write**, and click **Create**.
3. Copy the token and store it securely. Existing tokens stay copyable from this screen, so you can retrieve it later.

## Step 2: Connect in Probo

1. In Probo, go to **Access Reviews** > **Sources** > **Add Source**.
2. Find **Better Stack**, click **API Key**, paste the token, enter your **Team Name**, and click **Connect**.

Probo names the source after the team name you entered and pulls that team's members into your campaigns.

## Troubleshooting

- **Token rejected.** Confirm the token comes from the **Global API tokens** section, which is the kind Better Stack documents alongside the team name parameter. A **Telemetry API token** covers Telemetry resources including Errors, not the Uptime API.
- **No members appear.** Check the **Team Name** against the names Better Stack shows at **Settings** > **Teams** and enter it exactly. A global token selects the team through that name.
- **Token creation is unavailable.** Editing API tokens is an Admin permission in Better Stack. A Team lead can view tokens but not create them, so ask an Admin.
- **Roles do not match what the console shows.** The endpoint reports the role the member holds in the team being listed, so confirm the **Team Name** matches the team you meant to review. Custom roles are an Enterprise feature and come back as `custom`. Probo flags only `admin` and `team_lead` as administrators.
