Skip to main content

POST /webcast/resolve_user_ids

Resolve numeric TikTok user IDs to their corresponding usernames (unique_id/display_id). Accepts up to 20 user IDs per request with server-side caching for fast lookups. When you need this: TikTok’s internal APIs and WebSocket events often send numeric user IDs (like 6892636847263982593) instead of readable usernames. This endpoint converts them back to @username format. Caching: Results are cached server-side for 24 hours. Repeated lookups for the same user IDs are instant and don’t count toward rate limits. Response data: Returns an array of { user_id, unique_id, nickname, avatar_url } objects. Users whose IDs can’t be resolved (deleted accounts, banned users) are returned with unique_id: null.

Parameters

ParameterTypeRequiredDescription
user_idsstring[]YesArray of numeric user IDs (max 20)

Response

{ "status_code": 0, "data": { "123456": { "userId": "123456", "username": "john_doe", "cached": false } } }

Examples

const res = await fetch('https://api.tik.tools/webcast/resolve_user_ids?apiKey=YOUR_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ user_ids: ['107955', '6789012345'] })
});
const { data } = await res.json();
Object.values(data).forEach(u => console.log(`${u.userId} → @${u.username}`));