Title: build_header crashes when x-connection-hash is absent on Tweet Likes endpoint responses · Issue #49 · fa0311/twitter_openapi_python · GitHub
Open Graph Title: build_header crashes when x-connection-hash is absent on Tweet Likes endpoint responses · Issue #49 · fa0311/twitter_openapi_python
X Title: build_header crashes when x-connection-hash is absent on Tweet Likes endpoint responses · Issue #49 · fa0311/twitter_openapi_python
Description: 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"]...
Open Graph Description: 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 unconditio...
X Description: 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 unconditio...
Opengraph URL: https://github.com/fa0311/twitter_openapi_python/issues/49
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"build_header crashes when x-connection-hash is absent on Tweet Likes endpoint responses","articleBody":"Summary\nTwitter’s internal API stopped returning the `x-connection-hash` header for at least `get_likes` responses around 2025‑11‑04.\nThe helper [`twitter_openapi_python.utils.api.build_header`](https://github.com/fa0311/twitter_openapi_python/blob/64cc3699ef2163e1847321b4f18794116d7aa48a/twitter_openapi_python/twitter_openapi_python/utils/api.py#L259C9-L259C54) unconditionally reads `headers[\"x-connection-hash\"]`, so the call now raises KeyError in normal use.\n\nSteps to Reproduce\n1. Authenticate with valid cookies and create a client\n```\nclient = TwitterOpenapiPython().get_client_from_cookies(cookies)\ntweet_api = client.get_tweet_api()\ntweet_api.get_likes(user_id=\"your-id\")\n```\n2. Inspect the HTTP response headers returned by the API \n","author":{"url":"https://github.com/shungiku","@type":"Person","name":"shungiku"},"datePublished":"2025-11-06T14:57:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/49/twitter_openapi_python/issues/49"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6e8383c9-76bf-cc78-2138-c7a70e68cda0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91C0:1F99C3:C67CC47:CC42F12:6A4C526E |
| html-safe-nonce | 8c6a776bb64e0687490acb5263ffb9354164e8dbb71e16df01d98ab9d509f93e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUMwOjFGOTlDMzpDNjdDQzQ3OkNDNDJGMTI6NkE0QzUyNkUiLCJ2aXNpdG9yX2lkIjoiODQ4MTM0NjQzNDU4MjIwNTAzOCIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 2d8ef45e29e08214c19a37ec7af2837d5337a6e3e3435aaba4c7b12fe24200f9 |
| hovercard-subject-tag | issue:3596187374 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/fa0311/twitter_openapi_python/49/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b84bcc41c6fe55d1b8361c41bb4468d0aa10de23f891fe0b5bbc7ab996bc0a6d/fa0311/twitter_openapi_python/issues/49 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b84bcc41c6fe55d1b8361c41bb4468d0aa10de23f891fe0b5bbc7ab996bc0a6d/fa0311/twitter_openapi_python/issues/49 |
| og:image:alt | 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 unconditio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shungiku |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/fa0311/twitter_openapi_python git https://github.com/fa0311/twitter_openapi_python.git |
| octolytics-dimension-user_id | 34892635 |
| octolytics-dimension-user_login | fa0311 |
| octolytics-dimension-repository_id | 670318355 |
| octolytics-dimension-repository_nwo | fa0311/twitter_openapi_python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 670318355 |
| octolytics-dimension-repository_network_root_nwo | fa0311/twitter_openapi_python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 14099438da5379150f15a2892474c7c7e6c0e55e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width