> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/api-and-mcp-concepts/authentication.md).

# Access and authentication

API and MCP access is included in paid Starter, Creator, and Agency subscriptions. The free trial does not include API or MCP access. Generating an API key during a trial ends the trial and starts the paid subscription.

## REST API

1. Open [Settings > API](https://my.blotato.com/settings/api).
2. Generate or copy your API key.
3. Include the key in the `blotato-api-key` header of each request.
4. Call `GET https://backend.blotato.com/v2/users/me/accounts` to verify access.

```http
GET /v2/users/me/accounts HTTP/1.1
Host: backend.blotato.com
blotato-api-key: YOUR_API_KEY
```

Copy the full key, including any trailing `=` characters. Preserve the value exactly. JSON values use double quotes. Store credentials in your client's secret settings or environment, outside published examples.

## MCP

The server uses Streamable HTTP at `https://mcp.blotato.com/mcp` and accepts these authentication methods:

| Method         | Configuration                                                  |
| -------------- | -------------------------------------------------------------- |
| OAuth          | Add the server URL and complete the browser authorization flow |
| API key header | Set `blotato-api-key` to your API key                          |
| Bearer header  | Set `Authorization` to `Bearer YOUR_API_KEY`                   |

Use the configuration supported by your client in the [setup guide](/start-with-an-ai-agent/mcp/setup.md). A field named “Bearer token env var” expects an environment variable name, rather than the key itself. For a header-value form, paste the key into the header value.

After connecting, ask the assistant to call `blotato_list_accounts`. An empty array is a successful authenticated response with no connected accounts.

## Resolve access errors

| Result                                      | Next action                                                                                               |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `401` or invalid credentials                | Recopy the full API key, or repeat OAuth authorization in the client                                      |
| `403` with a subscription message           | Check the subscription in [Billing](https://my.blotato.com/settings/billing)                              |
| OAuth fails but an API-key request succeeds | Follow the [OAuth session troubleshooting](/start-with-an-ai-agent/mcp/faqs.md) steps for the client      |
| Accounts are missing                        | Confirm the Blotato account used to authorize, then check [Social accounts](/settings/social-accounts.md) |

Use the returned error to choose the next step. An OAuth error alone does not establish a billing problem.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.blotato.com/api-and-mcp-concepts/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
