> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/in-vivo/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/in-vivo/_mcp/server.

# Authentication

The Benchling In Vivo API uses OAuth 2.0 access tokens to authenticate requests. These Bearer tokens are the predominant type of access token used with OAuth 2.0.

The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.

All API requests must be made over [HTTPS](https://en.wikipedia.org/wiki/HTTPS). Calls made over plain HTTP will fail. API requests without authentication will also fail.

## Create an API key

Only administrators can create API keys. Each tenant can have multiple keys, each with its own scopes.

1. Click the **Manage Team** icon.
2. Go to **Integrations** and select **API keys**.
3. Click **Create API key**.
4. Name the key and select its scopes.
5. Click **Create API key**.

> **Warning**
>
> The client secret is shown only once, when the key is created. Store it securely. If you lose it, delete the API key and create a new one. The client ID stays visible afterward.

## Find your API host

API requests go to your tenant's API host, not the address you use in the browser:

|            | Format                              | Example                                                               |
| ---------- | ----------------------------------- | --------------------------------------------------------------------- |
| Tenant URL | `<tenant>.invivo.benchling.com`     | `biotechcompany.invivo.benchling.com`                                 |
| API host   | `<tenant>-api.invivo.benchling.com` | `https://biotechcompany-api.invivo.benchling.com/api/public/v1/users` |

If your tenant URL ends in `overwatchresearch.com`, use `overwatchresearch.com` in place of `invivo.benchling.com`. If you're unsure of your tenant's address, contact [Benchling Support](mailto:support@benchling.com).

## Get an access token

Exchange your API key's client ID and secret for a token with [Create a token](/in-vivo/authentication/oauth-token-create), then send it on each request as `Authorization: Bearer <access_token>`. Tokens expire after the number of seconds given in `expires_in`.