{"record":{"id":"94b90fc7bc3fcb75","repo":"ytdl-org/youtube-dl","slug":"unable-to-login-s-94b90f","errorCode":null,"errorMessage":"Unable to login: %s","messagePattern":"Unable to login: (.+?)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/gigya.py","lineNumber":20,"sourceCode":"\nfrom .common import InfoExtractor\n\nfrom ..utils import (\n    ExtractorError,\n    urlencode_postdata,\n)\n\n\nclass GigyaBaseIE(InfoExtractor):\n    def _gigya_login(self, auth_data):\n        auth_info = self._download_json(\n            'https://accounts.eu1.gigya.com/accounts.login', None,\n            note='Logging in', errnote='Unable to log in',\n            data=urlencode_postdata(auth_data))\n\n        error_message = auth_info.get('errorDetails') or auth_info.get('errorMessage')\n        if error_message:\n            raise ExtractorError(\n                'Unable to login: %s' % error_message, expected=True)\n        return auth_info\n","sourceCodeStart":2,"sourceCodeEnd":23,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/gigya.py#L2-L23","documentation":"Raised by GigyaBaseIE._gigya_login when the POST to https://accounts.eu1.gigya.com/accounts.login succeeds at HTTP level but the JSON carries errorDetails or errorMessage. Gigya is a third-party auth provider used by several broadcast extractors (e.g. SAT.1/CBS-style sites inheriting GigyaBaseIE). Marked expected=True.","triggerScenarios":"Logging in with credentials via a Gigya-backed site where the auth service rejects them: wrong password, account locked, invalid API key in auth_data, or Gigya datacenter mismatch (eu1 vs us1) causing login failure.","commonSituations":"Expired passwords, special characters mishandled in credentials, sites migrating to a different Gigya datacenter, or changes in the site's API key extracted from the page.","solutions":["Verify credentials by logging in to the site in a browser","Supply credentials via --username/--password or netrc for the specific site","Update youtube-dl/yt-dlp so the site's current API key/datacenter is used","If the error persists, inspect the accounts.login response with devtools to see the raw Gigya error"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import requests\nr = requests.post('https://accounts.eu1.gigya.com/accounts.login', data=auth_data)\nbody = r.json()\nif body.get('errorDetails') or body.get('errorMessage'):\n    print('Gigya login would fail:', body.get('errorDetails') or body.get('errorMessage'))","typeGuard":"def gigya_auth_ok(auth_info):\n    return isinstance(auth_info, dict) and not (auth_info.get('errorDetails') or auth_info.get('errorMessage'))","tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept DownloadError as e:\n    if 'Unable to login' in str(e):\n        refresh_credentials(site)  # expected auth failure\n    else:\n        raise","preventionTips":["Store Gigya-backed site credentials in netrc, not in scripts","Verify login in a browser before automating downloads","Note the datacenter (eu1) — a site switch breaks old extractors, so update the tool"],"tags":["authentication","gigya","login","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}