Serve TikTok URL prefix verification file
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d396afb5d7
commit
40d11ce332
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user