tonhowtf/omniget · error · anyhow::Error
Access token not available for clip
Error message
Access token not available for clip: {} What it means
The token GQL response parsed as JSON but the first element's /data/clip/playbackAccessToken pointer is missing or null: Twitch did not hand out a playback token for this slug. Usually the clip is unavailable in the requesting region or was removed, so the Usher playlist URL cannot be built; the {} is the slug.
Solutions
- Confirm the clip still exists and plays on twitch.tv
- Try from a different region/network if the clip is geo-restricted
- Fall back to yt-dlp download mode for this clip
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at src-tauri/src/platforms/twitch/mod.rs:232 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/3a88fb50149c32eb.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/twitch/mod.rs:232
.header("client-id", CLIENT_ID)
.json(&body)
.send()
.await?;
if !response.status().is_success() {
return Err(anyhow!(
"Twitch GQL token retornou HTTP {}",
response.status()
));
}
let json: serde_json::Value = response.json().await?;
let token_obj = json
.as_array()
.and_then(|arr| arr.first())
.and_then(|r| r.pointer("/data/clip/playbackAccessToken"))
.ok_or_else(|| anyhow!("Access token not available for clip: {}", slug))?;
let signature = token_obj
.get("signature")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow!("Token sem signature"))?
.to_string();
let value = token_obj
.get("value")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow!("Token sem value"))?
.to_string();
Ok(AccessToken { signature, value })
}
fn build_authenticated_url(source_url: &str, token: &AccessToken) -> String {
format!(View on GitHub (pinned to 8600b91f42)