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

# Authentication and permissions

> Issue workspace-bound tokens, choose read or write access, and revoke credentials without changing files.

## Issue a token

In **AI → API & SDK**, choose **Create token**. Give the integration a name, choose its access and set an expiry. The default maximum lifetime is 90 days and can be configured up to 365 days.

| Access | Allowed requests |
| - | - |
| Read only | GET and HEAD on documented REST endpoints, subject to current account permissions |
| Read & write | Documented reads and mutations, subject to current account permissions |

The complete token appears once after creation. Store it as a server-side secret. The database retains its SHA-256 digest and four-character suffix, not the plaintext credential. Studio limits each account to 20 active tokens per workspace and retains up to 100 token records for its history. Scheduled retention removes old expired history.

```http theme={null}
Authorization: Bearer fms_api_<identifier>.<secret>
```

Never put a token in a query string, public JavaScript bundle, shared URL or client-side storage. A private server proxy can call Studio for a public frontend. Browser cookies and MCP tokens do not authenticate this REST API.

## Authorization stays current

Every request resolves the registered account and checks the current tenant, workspace membership, `studio.api.use` and the operation's permissions. For example, write access on a token does not bypass `studio.files.trash` or source-specific restrictions.

Only the owner sees and revokes their tokens in Studio. Issuing or revoking credentials additionally requires `studio.api.manage` and a writable workspace role. Removing membership or a required permission blocks the corresponding API access without waiting for token expiry.

## Revocation and expiry

Select **Revoke** and confirm to stop new requests using the token. Files are unchanged. Upload sessions are bound to the original token: a different token cannot resume its sessions. Complete or cancel active uploads before rotating their token, or let configured staging retention clean abandoned data.

## Rate limits

Limits apply per token through Laravel's rate limiter. A rejected request returns `429` and a `Retry-After` header. Configure the application's limiter cache to Redis for consistent limits across multiple application nodes:

```php theme={null}
// config/cache.php
'limiter' => 'redis',
```

Use HTTPS in production, synchronize application keys and configure trusted proxies and any cross-origin policy in the host application. REST routes are stateless and do not disable CSRF protection on Studio's browser routes.


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