Apidog

All-in-one Collaborative API Development Platform

API Design

API Documentation

API Debugging

API Mocking

API Automated Testing

How to Use TikTok Display API: A Step-by-Step Guide for Developers

The TikTok Display API enables developers to embed videos, display user profiles, and search by hashtags in apps or websites. This guide covers registering your app, obtaining API keys, and integrating Tiktok APIs in your projects.

Iroro Chadere

Iroro Chadere

Updated on January 20, 2025

In today's digital age, social media integration has become increasingly important for developers and businesses looking to engage with their audience. With its ever-growing popularity, TikTok has emerged as a powerful platform for sharing short-form videos. To facilitate the seamless integration of TikTok content into websites and applications, TikTok has provided developers with the TikTok Display API. This API enables developers to embed TikTok videos, display user profiles, and search for videos based on hashtags directly within their platforms.

In this article, we will guide you through the process of using the TikTok Display API. We will begin with obtaining your API key, and then move on to demonstrating how to use that key to retrieve videos and profiles. By the end of this guide, you'll be equipped with the knowledge needed to integrate TikTok content into your website or application, enhancing user engagement and interaction. Let's get started!

đź’ˇ
Pro Tip: Before diving into TikTok's API integration, supercharge your workflow with Apidog, the all-in-one API development tool for designing, testing, mocking, and documenting APIs. With Apidog, you can simplify complex API workflows, test endpoints in minutes, and even mock responses without writing code—perfect for seamless development and quicker time-to-market! 🚀
button

Getting Started

The TikTok Display API enables developers to seamlessly integrate TikTok content into their websites and applications. With this API, developers can embed TikTok videos, display user profiles, and search for videos based on hashtags directly within their platforms. In this article, we'll review the TikTok Display API and see how we can use it to get users' profile & extend it to get user's videos.

To get started with the TikTok Display API, you need to register your application with the TikTok Developer Platform and obtain an access token. Below is a step-by-step guide on how to get your API key:

Create a Developer Account:

Go to the TikTok Developer Platform website. Click on the "Get started" button and create a new developer account if you don't already have one.

Register New Application:

For this step, the TikTok team will review your application and either approve or decline if you don't meet their requirements.

Once you're logged in to your developer account, click on "Developer Portal" and select "Manage Apps" from the dropdown menu. Click on the "Connect an app" button to register a new application.

After logging in to your developer account, navigate to the "Developer Portal". From there, select "Manage Apps" from the dropdown menu. Next, click the "Connect an App" button to register a new application.

You'll then be asked to enter your app details:

  1. App icon
  2. App name
  3. Category
  4. Description
  5. Terms of Service URL
  6. Privacy Policy URL
  7. Platforms
  8. App review
  9. Products
  10. Scope

Once you're done, click on the "Submit for review" on the top right corner of the page to request for review.

When you request for review, you'll be notified if your submission was approved or not. If it's approved, you'll be prompted to start using your app - by creating an API key!

Getting an Authorization Code:

As per the official TikTok article, we'll need an authorization code and an access token to utilize the Display APIs.

You can request your authorization code from here to continue with the next step. Once you've collected the authorization code, the next step is to use it to get your access token.

There are a couple of ways to get your access token - and we recommend checking the official guide to review the ones most suitable for you.

If everything goes as expected, you should see a successful response as follows;

{
    "data": {
        "access_token": "act.example12345Example12345Example",
        "captcha": "",
        "desc_url": "",
        "description": "",
        "error_code": 0,
        "expires_in": 86400,
        "log_id": "20220714041044010002007735002037040BAF34",
        "open_id": "abcdefgh-1a2b-123c4-ab12-abc123abc1234",
        "refresh_expires_in": 31536000,
        "refresh_token": "rft.example12345Example12345Example",
        "scope": "user.info.basic"
    },
    "message": "success"
}

From the response above, you can see your access_token, your refresh_tokens, and when they expires.

TikTok Display API

Now that your access_token is retrieved, the next thing is to use the TikTok display endpoint to retrieve the user's profile or videos - whatever you'd like to pull.

TikTok User's Display Endpoint

If you already have a nice UI, you can simply integrate the endpoint into your project.

https://open.tiktokapis.com/v2/user/info/?fields=open_id,union_id,avatar_url,display_name

For this guide though, I don't have a UI so I'm going to use Apidog to test the APIs.

Apidog provides a user-friendly interface for testing APIs, similar to popular tools like Postman. With its intuitive design and comprehensive feature set, Apidog simplifies the process of API testing and debugging, allowing developers to streamline their testing workflows and identify potential issues with ease.

What is Apidog | Apidog
This article introduces a brief user roadmap for using Apidog.

If you don't already have an account, please create an account to test the TikTok API endpoint.

button

The next thing is to log into your Apidog account and tap on "New Request".

Alt text

Once you tap on that link, you'll be redirected to a page to test the APIs.

Paste the request URL or the cURL in the request column as shown above. Select Bearer Token as the auth type and enter the token. Once everything is set up, click the Send button to view the response in the response console.

The response would be something similar to the below example:

{
   "data":{
      "user":{
         "avatar_url":"https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/b17f0e4b3a4f4a50993cf72cda8b88b8~c5_168x168.jpeg",
         "open_id":"723f24d7-e717-40f8-a2b6-cb8464cd23b4",
         "union_id":"c9c60f44-a68e-4f5d-84dd-ce22faeb0ba1",
         "display_name": "Tik Toker"
      }
   },
   "error":{
      "code":"ok",
      "message":"",
      "log_id":"20220829194722CBE87ED59D524E727021"
   }
}

You can also set assertions to validate the API response in Apidog.

Check out more Tiktok display endpoints from the official docs.

Conclusion

In today's digital age, social media integration has become increasingly important for developers and businesses looking to engage with their audience. With its ever-growing popularity, TikTok has emerged as a powerful platform for sharing short-form videos. To facilitate the seamless integration of TikTok content into websites and applications, TikTok has provided developers with the TikTok Display API.

Throughout this guide, we have explored how to utilize the TikTok Display API to embed TikTok videos and display user profiles, and you can extend it to search for videos based on hashtags directly within your platform. By following these steps, you can enhance user engagement and interaction, allowing your audience to interact with TikTok content without leaving your website or application.

By obtaining your API key and following the provided instructions, you can seamlessly integrate TikTok content into your platform. We hope this guide has provided you with the necessary knowledge to get started with the TikTok Display API.

Happy coding, and we look forward to seeing how you implement the TikTok Display API into your projects.

How to Use OpenAI's Image Generation API (gpt-image-1)Tutorials

How to Use OpenAI's Image Generation API (gpt-image-1)

Learn how to use OpenAI's gpt-image-1 API for advanced image generation in this technical guide. Follow step-by-step instructions to set up, authenticate, and test with Apidog. Discover best practices, advanced features, and real-world use cases for gpt-image-1. Start building today!

Ashley Innocent

April 24, 2025

How to Use Google's Gemini 2.5 Pro For Free with Google AI StudioTutorials

How to Use Google's Gemini 2.5 Pro For Free with Google AI Studio

Learn how to get started with Google’s Gemini 2.5 Pro at no cost using Google AI Studio. This guide walks developers through everything from signing up to running multimodal prompts with one of the most powerful AI models available today.

Emmanuel Mumba

April 23, 2025

How to Run Gemma 3 QAT with OllamaTutorials

How to Run Gemma 3 QAT with Ollama

Learn how to run Gemma 3 QAT with Ollama in this 1500-word technical guide. Discover step-by-step instructions for installation, API integration, and testing with Apidog, a superior API tool. Optimize your local LLM deployment for privacy and efficiency.

Ashley Innocent

April 23, 2025