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

# Request Headers

All Plex API requests require specific headers to authenticate and route your requests correctly.

## Subscription Key Header

All Plex API requests require a valid subscription key header. The `X-Plex-Connect-Api-Key` header is a subscription key that provides access to the API.

You can obtain your API key through the [Plex Developer Portal](https://developers.plex.com/). See [Obtain API Credentials](/get-started/obtain-api-credentials) for detailed steps.

> **Warn**
>
> Every API request must include the `X-Plex-Connect-Api-Key` header. Requests without a valid subscription key will be rejected.

### Error response

If you do not include the subscription key header in an API request or provide an invalid subscription key, you will receive the following response:

```json
{
  "code": "REQUEST_NOT_AUTHENTICATED",
  "message": "The request could not be authenticated."
}
```

### Example request

Include the subscription key header in your API requests as shown below:

```bash
curl -X GET "https://api.plex.com/v1/resource" \
  -H "X-Plex-Connect-Api-Key: your-subscription-key"
```