Definition
TikTok's sec_uid is an opaque internal string identifier for a user account, required by most profile, video, and follower API endpoints, distinct from the numeric user_id.
Need the sec_uid, not the definition?
The free TikTok secUid Finder resolves any public handle or profile link to its sec_uid and numeric user id, with a copy button and a ready-to-run request. No login, first three lookups free.
Get a sec_uid freeIn Depth
The sec_uid looks like MS4wLjABAAAA... — a base64-style string that runs about 70-80 characters. It does not change when a user changes their username, which is what makes it the stable identifier for long-term tracking. The endpoints that return a user's posts, followers, and followings all key on it; a bare username or the short numeric uid is not accepted there.
A sec_uid cannot be derived or guessed from a handle — it has to come back from a profile lookup. If you just need the value once, paste the handle into the free TikTok secUid Finder and copy it. In code it is one call:
import requests
API = "https://api.scavio.dev/api/v1/tiktok"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
# Step 1: resolve the handle (1 credit)
profile = requests.post(
f"{API}/profile",
headers=HEADERS,
json={"username": "target_creator"},
).json()
sec_uid = profile["data"]["user"]["sec_uid"]
print(sec_uid) # MS4wLjABAAAA...
# Step 2: use it wherever sec_user_id is required
posts = requests.post(
f"{API}/user/posts",
headers=HEADERS,
json={"sec_user_id": sec_uid, "count": 20},
).json()Watch the naming, because the same value has three spellings. TikTok's web API returns it as secUid in camelCase; the app API returns it as sec_uid, which is what Scavio's profile response carries; and the endpoints that consume it take it as sec_user_id in the request body. There is no lowercase secuid anywhere in the API — that spelling only exists in search boxes. The profile endpoint accepts either username or sec_user_id, so once the string is cached you never need the handle again.
Cache the sec_uid per account. It rarely changes and the profile call costs 1 credit — re-fetching it before every request is the most common source of unnecessary credit spend in TikTok integrations.
Example Usage
A creator analytics pipeline caches sec_uid for 500 tracked creators in SQLite, refreshing weekly. This reduces profile lookup calls from 3,500/week to 500/week, saving 3,000 credits ($15/week) at Scavio rates.
Platforms
TikTok sec_uid is relevant across the following platforms, all accessible through Scavio's unified API:
- tiktok