ytdl-org/youtube-dl · error · ExtractorError

Unable to login: %s

Error message

Unable to login: %s

What it means

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.

Source

Thrown at youtube_dl/extractor/gigya.py:20

from .common import InfoExtractor

from ..utils import (
    ExtractorError,
    urlencode_postdata,
)


class GigyaBaseIE(InfoExtractor):
    def _gigya_login(self, auth_data):
        auth_info = self._download_json(
            'https://accounts.eu1.gigya.com/accounts.login', None,
            note='Logging in', errnote='Unable to log in',
            data=urlencode_postdata(auth_data))

        error_message = auth_info.get('errorDetails') or auth_info.get('errorMessage')
        if error_message:
            raise ExtractorError(
                'Unable to login: %s' % error_message, expected=True)
        return auth_info

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Verify credentials by logging in to the site in a browser
  2. Supply credentials via --username/--password or netrc for the specific site
  3. Update youtube-dl/yt-dlp so the site's current API key/datacenter is used
  4. If the error persists, inspect the accounts.login response with devtools to see the raw Gigya error
Defensive patterns

Strategy: try-catch

Validate before calling

import requests
r = requests.post('https://accounts.eu1.gigya.com/accounts.login', data=auth_data)
body = r.json()
if body.get('errorDetails') or body.get('errorMessage'):
    print('Gigya login would fail:', body.get('errorDetails') or body.get('errorMessage'))

Type guard

def gigya_auth_ok(auth_info):
    return isinstance(auth_info, dict) and not (auth_info.get('errorDetails') or auth_info.get('errorMessage'))

Try / catch

try:
    ydl.extract_info(url)
except DownloadError as e:
    if 'Unable to login' in str(e):
        refresh_credentials(site)  # expected auth failure
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/94b90fc7bc3fcb75. Report an issue: GitHub.