TikTok

TikTok

Social

Fetches user info and user's video posts on TikTok platform

Visit API

πŸ“š Documentation & Examples

Everything you need to integrate with TikTok

πŸš€ Quick Start Examples

TikTok Javascript Examplejavascript
// TikTok API Example
const response = await fetch('https://developers.tiktok.com/doc/login-kit-web', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

The TikTok User Info and Video Posts API is an essential tool for developers looking to integrate user information and video content from the popular TikTok platform into their applications. By leveraging this API, you can seamlessly retrieve a user's profile details, such as their username, profile picture, and bio, alongside accessing their video posts. This opens up a myriad of possibilities for user engagement and content interaction, enhancing the overall user experience while promoting user-generated content directly within your application. With a robust authentication mechanism in place, the API ensures that user data is accessed securely and efficiently, fostering trust and reliability in your integration.

Utilizing this API comes with several benefits:

  • Access complete user profiles and their TikTok videos effortlessly.
  • Enhance user engagement by displaying personalized content within your app.
  • Foster a sense of community by integrating user-generated videos.
  • Save development time with well-documented endpoints and examples.
  • Maintain high security with OAuth2 authentication protocol for data access.

Here’s a simple JavaScript example demonstrating how to call the TikTok User Info and Video Posts API:

const fetchUserInfo = async (userId, accessToken) => {
    const url = `https://api.tiktok.com/user/${userId}/info`;
  
    const response = await fetch(url, {
        method: 'GET',
        headers: {
            'Authorization': `Bearer ${accessToken}`,
            'Content-Type': 'application/json'
        }
    });

    if (response.ok) {
        const data = await response.json();
        console.log('User Info:', data);
    } else {
        console.error('Error fetching user info:', response.statusText);
    }
};

// Example usage
const userId = '1234567890'; // Replace with actual user ID
const accessToken = 'your_access_token_here'; // Replace with your access token
fetchUserInfo(userId, accessToken);

πŸ“Š 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 24Jun 26Jun 28Jun 30Jul 2Jul 4Jul 6Jul 8Jul 10Jul 12Jul 14Jul 16Jul 18Jul 20Jul 2304008001440Minutes
Online
Offline

Related APIs in Social