tonhowtf/omniget · error
Age-restricted content
Error message
Age-restricted content
What it means
The itemStruct flag isContentClassified is true, meaning TikTok has classified the content as age-restricted or sensitive and will not serve full media data to unauthenticated clients. The library refuses to proceed rather than returning incomplete data.
Solutions
- Use an authenticated session/cookies from an age-verified TikTok account.
- Confirm the content classification in a browser — the video may genuinely require login.
- If you control the content, remove the age-restriction flag from the TikTok post settings.
- Do not attempt to bypass the restriction; fall back to manual download by the user.
Defensive patterns
Strategy: validation
Validate before calling
// cannot be pre-validated via API; detect and handle
if e.to_string() == "Age-restricted content" { require_authenticated_age_verified_session(); } Try / catch
match tiktok.get_media_info(url).await {
Err(e) if e.to_string() == "Age-restricted content" => {
// prompt user: needs age-verified logged-in session
}
other => { other?; }
} Prevention
- Use cookies from an age-verified TikTok account for such posts.
- Pre-screen URLs against known-restricted content lists.
- Don't retry — the restriction is server-side and persistent.
- Communicate the restriction clearly instead of attempting workarounds.
When it happens
Trigger: fetch_detail reads detail.isContentClassified == true in the itemStruct and returns 'Age-restricted content' before any media extraction.
Common situations: Videos flagged 18+/sensitive by TikTok; downloading content without being logged in to an age-verified account; regional content-rating classifications.
Related errors
- Age-restricted content
- ERR_TOO_MANY_ATTACHMENTS
- os favoritos e os curtidos só saem com a sua sessão…
- não achei o secUid de @
- Age-restricted content
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/ac7cff887b2685e7.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/tiktok.rs:202
}
if let Some(status_code) = video_detail.get("statusCode").and_then(|v| v.as_u64()) {
if status_code != 0 {
return Err(anyhow!("Post not available (status {})", status_code));
}
}
let detail = video_detail
.pointer("/itemInfo/itemStruct")
.ok_or_else(|| anyhow!("Video data not found in TikTok response"))?
.clone();
if detail
.get("isContentClassified")
.and_then(|v| v.as_bool())
.unwrap_or(false)
{
return Err(anyhow!("Age-restricted content"));
}
if detail.get("author").is_none() {
return Err(anyhow!("Post not available"));
}
Ok(detail)
}
fn extract_author(detail: &serde_json::Value) -> String {
detail
.pointer("/author/uniqueId")
.or_else(|| detail.pointer("/author/unique_id"))
.and_then(|v| v.as_str())
.unwrap_or("unknown")
.to_string()
}
View on GitHub (pinned to 8600b91f42)