Skip to navigation
Get Started

Request Headers

Required and optional headers for Plex API requests
View as Markdown

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. See Obtain API Credentials for detailed steps.

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:

{
"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:

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