Skip to content

build_header crashes when x-connection-hash is absent on Tweet Likes endpoint responses #49

Description

@shungiku

Summary
Twitter’s internal API stopped returning the x-connection-hash header for at least get_likes responses around 2025‑11‑04.
The helper twitter_openapi_python.utils.api.build_header unconditionally reads headers["x-connection-hash"], so the call now raises KeyError in normal use.

Steps to Reproduce

  1. Authenticate with valid cookies and create a client
client = TwitterOpenapiPython().get_client_from_cookies(cookies)
tweet_api = client.get_tweet_api()
tweet_api.get_likes(user_id="your-id")
  1. Inspect the HTTP response headers returned by the API

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions