> ## Documentation Index
> Fetch the complete documentation index at: https://support.configview.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Grain setup

Configview reads your Grain workspace through the Grain public API (`https://api.grain.com/_/public-api/v2`), using a **Workspace Access Token** that a workspace admin creates in Grain. Configview sends only read requests (the list endpoints are `POST` by Grain's design, with no body that changes anything). It never creates, changes or deletes anything in Grain.

You will end up with **1 required secret** (`GRAIN_API_TOKEN`) in Configview when setup is complete.

> **Scope of this integration today.** Configview reads who is in the workspace, the teams and meeting types, metadata of recordings from the last 90 days (who recorded, when, how long, the source, how it is shared, which teams and meeting type, the sensitivity label and participant counts), playlists with their sharing setting, stories with whether a public link exists, webhook hosts and what kind of token it holds. It never reads or stores transcripts, AI summaries, action items, highlights, private notes, recording titles, recording or media links, or the names and emails of participants (they are used only to count external email domains).

***

## Read this first: the token cannot be read-only

A Workspace Access Token gives **full data access to the workspace**. Grain has no read-only token and no scopes on it. Only workspace admins can generate one, and the workspace scope is not available on every Grain plan (see Grain's pricing page). The token does not expire.

What you can do about it:

* Generate the token while signed in as an admin you are happy to tie it to, and name it something recognisable such as `Configview`.
* Store it only in Configview. Revoke it in Grain to cut access at once.
* A **personal** token also works but sees only that person's recordings, so most questions will be incomplete. The health check warns when the token is not workspace scope.

## What the Grain API does not tell Configview

The API has **no roles, admin flags, seat or plan usage, last-active dates, 2FA or SSO status, pending invites, team membership, connected calendars or integrations list, or audit log**. Configview cannot answer who is an admin or what people did in Grain, and it cannot tell who was removed except by comparing recording owners to the user list.

***

## What you need

* A Grain plan that offers the workspace API scope
* A workspace admin to create the token

***

## Step 1: Open the Grain page in Configview

`https://{companyname}.configview.com/admin/integrations/grain`

## Step 2: Create the token

1. In Grain open **Settings**, then **Integrations**, then the **API** tab
2. Generate a **Workspace Access Token** and copy it now
3. In Configview paste it into `GRAIN_API_TOKEN` under **Credentials** and click the save icon

## Step 3: Connect and verify

1. Click **Connect**. Configview creates its tables and schedules every collector at your default run time:

| Script | Notes |
| - | - |
| **Users** | Workspace roster with name and email. |
| **Teams** | Team names. |
| **Meeting types** | Meeting type names and whether each is internal or external. |
| **Recordings** | Metadata for the last 90 days. Never titles, links, media or content. |
| **Playlists** | Name, sharing setting and recording count. |
| **Stories** | Dates and whether a public link exists. |
| **Webhooks** | Event type and receiving host only. |
| **Token info** | Token type, scope, name and expiry. |

2. Click **Verify now**. The health check reads the secret, calls `GET /token-info` (and fails if the token is not workspace scope), then reads the user list.

If a check fails: **401** means the token was revoked or mistyped. **403** on a list usually means a personal token or a plan without the workspace scope. **429** means the rate limit was hit; retry in a few seconds.

***

## Data Tables

Each table has a `run_at` column and keeps only the newest run.

| Table | Source | Key Columns |
| - | - | - |
| `grain_users` | `POST /users` | user\_id, name, email |
| `grain_teams` | `POST /teams` | team\_id, name |
| `grain_meeting_types` | `POST /meeting_types` | meeting\_type\_id, name, scope |
| `grain_recordings` | `POST /recordings` | recording\_id, recorder\_email, start\_datetime, duration\_ms, source, share\_state, workspace\_shared, team\_ids, meeting\_type\_name, sensitivity, participant\_count, external\_participant\_count, external\_domain\_count |
| `grain_playlists` | `POST /playlists`, `GET /playlists/:id/recordings` | playlist\_id, name, share\_state, recording\_count |
| `grain_stories` | `POST /stories` | story\_id, created\_datetime, last\_edited\_datetime, has\_public\_link |
| `grain_hooks` | `POST /hooks` | hook\_id, enabled, hook\_host, hook\_type |
| `grain_token_info` | `GET /token-info` | token\_type, scope, workspace\_id, token\_name, never\_expires |

***

## Rate limits

Grain uses a token bucket per token: 30 requests of burst, refilled at 2 per second. Configview paces at 100 requests per minute and retries a 429 after the `Retry-After` header. Every response carries `x-ratelimit-limit` and `x-ratelimit-remaining`.

## Known gaps and things to check on the first run

These come from Grain's published API docs (version 2026-10-01); no live tenant has been tested yet.

* **Date filter.** Grain's description of the recording `before_datetime` and `after_datetime` filters looks swapped, so Configview sends no date filter, reads pages, and keeps recordings that started in the last 90 days. If the list is not newest first, it reads up to 400 pages.
* **Participants include.** Configview asks for `include: {"participants": true}`. If Grain rejects it, the recording counts are NULL and the participant counts are empty.
* **Page size.** No page size is documented, so the default is used.
* **Recorder.** The first entry of `recorders` is stored as the owner; Grain documents no separate owner field.
* **Stories and playlists.** A public link is detected from the story's `public_url` being present. Playlist sizes need one extra call per playlist.
* **Plans.** Which plans include the workspace scope is not stated in the docs.
* **Webhooks.** Grain documents no signing secret for webhook deliveries.

## Things worth knowing

**Public links.** A recording or story with a public link can be opened by anyone who has the URL. Review those first, especially recordings with external participants or a sensitive label.

**Leavers.** Recordings owned by someone who is no longer in the user list keep their sharing settings. Check who is responsible for them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.