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.
In Depth
The sec_uid looks like `MS4wLjABAAAA...` — a base64-encoded string 60-80 characters long. It does not change when a user changes their username, making it the stable identifier for long-term tracking. Most TikTok API endpoints reject requests using username or numeric user_id alone; sec_uid is mandatory. Retrieving sec_uid requires a two-step process. First, call the user search or profile endpoint with the username. Second, extract sec_uid from the response. Using Scavio's TikTok API: ```python import requests API_BASE = "https://api.scavio.dev/api/v1/tiktok" HEADERS = {"Authorization": "Bearer YOUR_API_KEY"} # Step 1: get profile by username profile = requests.post( f"{API_BASE}/user/info", headers=HEADERS, json={"username": "target_creator"} ).json() sec_uid = profile["data"]["user"]["secUid"] print(sec_uid) # MS4wLjABAAAA... # Step 2: use sec_uid for follower list followers = requests.post( f"{API_BASE}/user/followers", headers=HEADERS, json={"sec_uid": sec_uid, "count": 100} ).json() ``` Cache the sec_uid per username lookup — it rarely changes and the profile call costs 1 credit. Re-fetching it on 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
Related Terms
TikTok Follower Quality Signal
TikTok follower quality signals are data indicators derived from API-accessible metrics that distinguish genuine audienc...
TikTok Engagement Rate Calculation
TikTok engagement rate is calculated as (likes + comments + shares) divided by views, expressed as a percentage, measuri...