{"record":{"id":"ac7cff887b2685e7","repo":"tonhowtf/omniget","slug":"age-restricted-content","errorCode":null,"errorMessage":"Age-restricted content","messagePattern":"Age-restricted content","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/platforms/tiktok.rs","lineNumber":202,"sourceCode":"        }\n\n        if let Some(status_code) = video_detail.get(\"statusCode\").and_then(|v| v.as_u64()) {\n            if status_code != 0 {\n                return Err(anyhow!(\"Post not available (status {})\", status_code));\n            }\n        }\n\n        let detail = video_detail\n            .pointer(\"/itemInfo/itemStruct\")\n            .ok_or_else(|| anyhow!(\"Video data not found in TikTok response\"))?\n            .clone();\n\n        if detail\n            .get(\"isContentClassified\")\n            .and_then(|v| v.as_bool())\n            .unwrap_or(false)\n        {\n            return Err(anyhow!(\"Age-restricted content\"));\n        }\n\n        if detail.get(\"author\").is_none() {\n            return Err(anyhow!(\"Post not available\"));\n        }\n\n        Ok(detail)\n    }\n\n    fn extract_author(detail: &serde_json::Value) -> String {\n        detail\n            .pointer(\"/author/uniqueId\")\n            .or_else(|| detail.pointer(\"/author/unique_id\"))\n            .and_then(|v| v.as_str())\n            .unwrap_or(\"unknown\")\n            .to_string()\n    }\n","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/platforms/tiktok.rs#L184-L220","documentation":"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.","triggerScenarios":"fetch_detail reads detail.isContentClassified == true in the itemStruct and returns 'Age-restricted content' before any media extraction.","commonSituations":"Videos flagged 18+/sensitive by TikTok; downloading content without being logged in to an age-verified account; regional content-rating classifications.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// cannot be pre-validated via API; detect and handle\nif e.to_string() == \"Age-restricted content\" { require_authenticated_age_verified_session(); }","typeGuard":null,"tryCatchPattern":"match tiktok.get_media_info(url).await {\n    Err(e) if e.to_string() == \"Age-restricted content\" => {\n        // prompt user: needs age-verified logged-in session\n    }\n    other => { other?; }\n}","preventionTips":["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."],"tags":["tiktok","age-restriction","content-policy","authentication"],"backgroundTag":"authentication-required","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}