diff --git a/backend/app/main.py b/backend/app/main.py index 961909e..fe948a0 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -882,6 +882,17 @@ async def tiktok_oauth_start(channel_pk: str, request: Request) -> RedirectRespo return RedirectResponse(url, status_code=302) +@app.get("/api/tiktok/oauth/callback/tiktokSac63LUYsqRR1brRHZ2v2hw9x0RjXR9L.txt") +async def tiktok_url_prefix_verify_file() -> FileResponse: + """TikTok URL prefix ownership verification.""" + from pathlib import Path + + path = Path(__file__).resolve().parent.parent / "data" / "tiktok_verify" / "tiktokSac63LUYsqRR1brRHZ2v2hw9x0RjXR9L.txt" + if not path.is_file(): + raise HTTPException(404, "verification file missing") + return FileResponse(path, media_type="text/plain") + + @app.get("/api/tiktok/oauth/callback") async def tiktok_oauth_callback( request: Request,