{"record":{"id":"813d4f1ca3dc1d5b","repo":"yt-dlp/yt-dlp","slug":"this-video-is-only-available-for-registered-users-813d4f","errorCode":null,"errorMessage":"This video is only available for registered users. You may want to use --cookies.","messagePattern":"This video is only available for registered users\\. You may want to use --cookies\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"yt_dlp/extractor/dplay.py","lineNumber":49,"sourceCode":"                query['deviceId'] = uuid.uuid4().hex\n            token = self._download_json(\n                disco_base + 'token', display_id, 'Downloading token',\n                query=query)['data']['attributes']['token']\n\n            # Save cache only if cookies are not being set\n            if not self._get_cookies(disco_base).get('st'):\n                self._auth_token_cache[key] = token\n\n        return f'Bearer {token}'\n\n    def _process_errors(self, e, geo_countries):\n        info = self._parse_json(e.cause.response.read().decode('utf-8'), None)\n        error = info['errors'][0]\n        error_code = error.get('code')\n        if error_code == 'access.denied.geoblocked':\n            self.raise_geo_restricted(countries=geo_countries)\n        elif error_code in ('access.denied.missingpackage', 'invalid.token'):\n            raise ExtractorError(\n                'This video is only available for registered users. You may want to use --cookies.', expected=True)\n        raise ExtractorError(info['errors'][0]['detail'], expected=True)\n\n    def _update_disco_api_headers(self, headers, disco_base, display_id, realm):\n        headers['Authorization'] = self._get_auth(disco_base, display_id, realm, False)\n\n    def _download_video_playback_info(self, disco_base, video_id, headers):\n        streaming = self._download_json(\n            disco_base + 'playback/videoPlaybackInfo/' + video_id,\n            video_id, headers=headers)['data']['attributes']['streaming']\n        streaming_list = []\n        for format_id, format_dict in streaming.items():\n            streaming_list.append({\n                'type': format_id,\n                'url': format_dict.get('url'),\n            })\n        return streaming_list\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/yt-dlp/yt-dlp/blob/81ecd58b1394793e6da9998cc19fdb45657f1685/yt_dlp/extractor/dplay.py#L31-L67","documentation":"dplay/Discovery+ playback authorization error. _process_errors inspects the error JSON from a failed disco API call; error code 'access.denied.missingpackage' (your account's package lacks this content) or 'invalid.token' (missing or bad authorization token) raises this expected error suggesting cookies. The st cookie from a logged-in browser session is what the extractor needs to mint a valid Bearer token.","triggerScenarios":"Calling the disco playbackInfo API without a logged-in session for content requiring registration; an account without the required subscription package (missingpackage); expired session cookies (invalid.token).","commonSituations":"Downloading DPlay/Discovery+/Eurosport/food-network style URLs without --cookies; free-tier accounts hitting premium content; cookie files exported before the site session expired.","solutions":["Log in on the site in a browser and export cookies, then run with --cookies cookies.txt.","If you already passed cookies, re-export them: they may be for the wrong domain/region or expired.","missingpackage means your subscription tier does not include the content - check your plan in the account page.","The geoblocked variant (access.denied.geoblocked) needs a --proxy in a licensed country, not cookies."],"exampleFix":"# before\nyt-dlp https://www.dplay.com/video/...\n# after\nyt-dlp --cookies ~/cookies.txt https://www.dplay.com/video/...","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from yt_dlp.utils import ExtractorError\n\ntry:\n    info = ydl.extract_info(url, download=False)\nexcept ExtractorError as e:\n    if 'only available for registered users' in str(e):\n        enable_cookies('cookies.txt')  # re-run with a logged-in session\n    raise","preventionTips":["Always export fresh cookies from a logged-in browser for dplay-family sites.","Confirm your subscription tier includes the content (missingpackage) before reporting bugs."],"tags":["dplay","discovery-plus","authentication","cookies","subscription"],"backgroundTag":"authentication-required","analyzedSha":"81ecd58b1394793e6da9998cc19fdb45657f1685","analyzedAt":"2026-08-22T12:21:25.439Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}