{"record":{"id":"4ae97c688bb1672e","repo":"Radarr/Radarr","slug":"plex-api-responded-with-html-content-site-is-like","errorCode":null,"errorMessage":"Plex API responded with html content. Site is likely blocked or unavailable.","messagePattern":"Plex API responded with html content\\. Site is likely blocked or unavailable\\.","errorType":"exception","errorClass":"ImportListException","httpStatus":null,"severity":"warning","filePath":"src/NzbDrone.Core/ImportLists/Plex/PlexParser.cs","lineNumber":63,"sourceCode":"                    Title = item.Title,\n                    Year = item.Year\n                });\n            }\n\n            return movies;\n        }\n\n        protected virtual bool PreProcess(ImportListResponse importListResponse)\n        {\n            if (importListResponse.HttpResponse.StatusCode != HttpStatusCode.OK)\n            {\n                throw new ImportListException(importListResponse, \"Plex API call resulted in an unexpected StatusCode [{0}]\", importListResponse.HttpResponse.StatusCode);\n            }\n\n            if (importListResponse.HttpResponse.Headers.ContentType != null && importListResponse.HttpResponse.Headers.ContentType.Contains(\"text/json\") &&\n                importListResponse.HttpRequest.Headers.Accept != null && !importListResponse.HttpRequest.Headers.Accept.Contains(\"text/json\"))\n            {\n                throw new ImportListException(importListResponse, \"Plex API responded with html content. Site is likely blocked or unavailable.\");\n            }\n\n            return true;\n        }\n\n        private string FindGuid(List<PlexSectionItemGuid> guids, string prefix)\n        {\n            var scheme = $\"{prefix}://\";\n\n            return guids?.FirstOrDefault((guid) => guid.Id.StartsWith(scheme))?.Id.Replace(scheme, \"\");\n        }\n    }\n}\n","sourceCodeStart":45,"sourceCodeEnd":77,"githubUrl":"https://github.com/Radarr/Radarr/blob/ca451608dc60c6cec754aba8d96bfa30e9468ed5/src/NzbDrone.Core/ImportLists/Plex/PlexParser.cs#L45-L77","documentation":"Thrown by PlexParser.PreProcess when the response Content-Type contains 'text/json' but the request Accept did not request 'text/json', indicating the server returned an HTML page (login/captcha/block) instead of Plex JSON. It is an ImportListException tied to the response.","triggerScenarios":"Response Content-Type contains 'text/json' AND request Accept is non-null AND does NOT contain 'text/json'. Practically: Plex.tv (or an intermediary) served an HTML interstitial labelled with a JSON-ish content type.","commonSituations":"Cloudflare/Plex challenge page, an ISP block redirect, or the access token being rejected so Plex returns its HTML login page. Network-level interception is the usual cause.","solutions":["Re-authenticate the Plex list (OAuth) so requests carry a valid token and Plex returns JSON.","Check for network-level blocks (VPN/ISP/Cloudflare) by opening the Plex API URL in a browser from the Radarr host.","Disable the list if the block is permanent in your region."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var ct = importResponse.HttpResponse.Headers.ContentType ?? string.Empty;\nif (ct.Contains(\"text/html\")) { /* blocked/login page served — re-auth or fix network */ }","typeGuard":"static bool IsHtmlIntercept(Exception ex) => ex is ImportListException && ex.Message.Contains(\"html content\");","tryCatchPattern":"try { parser.ParseResponse(importResponse); }\ncatch (ImportListException ex) when (ex.Message.Contains(\"html content\")) { _logger.Warn(\"Plex returned an HTML page; re-auth or check network: {0}\", ex.Response.Request.Url); }","preventionTips":["Re-authenticate the Plex list so a valid token is sent.","Check for CDN/ISP interception by opening the Plex API URL from the Radarr host."],"tags":["radarr","plex","import-list","content-type","blocked"],"backgroundTag":null,"analyzedSha":"ca451608dc60c6cec754aba8d96bfa30e9468ed5","analyzedAt":"2026-08-13T17:21:54.115Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}