tonhowtf/omniget · error
Syndication API retornou HTTP
Error message
Syndication API retornou HTTP {} What it means
request_syndication fails with this error when Twitter's syndication CDN endpoint (cdn.syndication.twimg.com/tweet-result) returns a non-2xx status. This is the fallback path for tweet media extraction, used when GraphQL is unavailable.
Solutions
- Verify the token calculation in calculate_syndication_token is still valid (Twitter changes it periodically)
- Check the tweet is accessible logged-out in a browser
- Retry on 5xx/429 with backoff
- Try the GraphQL path instead if syndication keeps failing
Example fix
// before
if !response.status().is_success() {
return Err(anyhow!("Syndication API retornou HTTP {}", response.status()));
}
// after
let status = response.status();
if !status.is_success() {
let body = response.text().await.unwrap_or_default();
return Err(anyhow!("Syndication API retornou HTTP {}: {}", status, body));
} Defensive patterns
Strategy: fallback
Validate before calling
// only call syndication if the tweet ID is numeric and non-empty
fn syndication_eligible(id: &str) -> bool { !id.is_empty() && id.chars().all(|c| c.is_ascii_digit()) } Try / catch
// try GraphQL first, syndication as fallback native_get_media_info(url).or_else(|_| syndication_get_media_info(url))
Prevention
- Keep calculate_syndication_token in sync with the current web client algorithm
- Rate-limit syndication calls; the CDN throttles aggressively
- Log status + body on failure for fast diagnosis
- Use syndication only as a fallback, not the primary path
When it happens
Trigger: The syndication endpoint returns 404 (tweet unavailable), 403 (bot detection / invalid calculated syndication token), 429 (rate limited), or 5xx.
Common situations: The calculate_syndication_token algorithm no longer matches Twitter's expectations (403); tweet removed or geo-restricted (404); CDN rate limiting heavy use.
Related errors
- Syndication API retornou HTTP
- Não capturei seu login. Tenta de novo.
- YouTube não retornou URL
- Falha ao obter guest token: HTTP
- Twitter API retornou HTTP
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/291367d44e042e28.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/twitter.rs:394
"https://cdn.syndication.twimg.com/tweet-result?id={}&token={}",
tweet_id, token
);
let mut request = self.client.get(&url);
if let Some(cookie) = Self::auth_cookie_string() {
request = request.header("Cookie", cookie);
}
let response = request.send().await?;
tracing::debug!(
"[twitter] syndication tweet_id={} token={} status={}",
tweet_id,
token,
response.status()
);
if !response.status().is_success() {
return Err(anyhow!(
"Syndication API retornou HTTP {}",
response.status()
));
}
response.json().await.map_err(Into::into)
}
fn extract_graphql_media(
json: &serde_json::Value,
tweet_id: &str,
) -> anyhow::Result<Vec<serde_json::Value>> {
let instructions = json
.pointer("/data/threaded_conversation_with_injections_v2/instructions")
.and_then(|v| v.as_array())
.ok_or_else(|| anyhow!("Post not available"))?;
let add_insn = instructionsView on GitHub (pinned to 8600b91f42)