How To Get Your Ad Data from the TikTok API (using Postman)

joinr

joinr

Max min read

Advertising data is often trapped in the in-platform analytics tools. To fetch your data and analyze it in a third-party tool, you have two options: manual API pulls, or leveraging an automatic data unification tool. This article outlines a step-by-step process for using the TikTok API, and offers another solution for marketers who don’t have time for hours of manual work.

Quick disclaimer: Using the TikTok API to pull ad data out of the platform can be a lengthy and cumbersome process. This guide provides a step-by-step process for tapping into the TikTok API to extract data for campaign analysis in a third-party tool. However, if you’re a “ain’t nobody got time for that” kind of marketer, we recommend using an ad data connector to do the data dirty work for you. Obviously we’d love it if you used Joinr. Because we’re free, and from a totally biased perspective, the absolute best in the biz.

Step 1: Connect an App to TikTok

  1. After you login to the TikTok Marketing API Portal and set up your developer account, the first step is to “Create an App”.
  2. Tiktok Ads Api Connect AppFrom there, you set up your app by giving it a name, adding a description, and selecting all relevant permissions:Tiktok Ads Api Description

After you click “Confirm”, this will create your app and set it to Pending. The approval process takes about 1-2 days; after the app is approved, you will see the app details, which importantly reveal your App ID and Secret.

Step 2: Auth Code + Access Tokens

Once your app has been approved, it will generate an authorization URL, which we’ll use to get your auth code and any relevant access tokens.

  1. Copy the Advertizer authorization URL, and paste it into a new tab.
  2. Tiktok Ads Api UrlThis will open a modal screen that will ask you to confirm any permissions that were set on this particular app.
  3. Tiktok Ads Api PermissionsAfter you click “confirm”, you’ll be redirected to the URL you set in the Advertiser redirect URL (see screenshot above). In this new redirected URL, you’ll see an auth code. Copy and paste that and keep note of it somewhere.

Tiktok Ads Api Auth Code

Step 3: Use an API service to capture values

For this step, we’ll use Postman to input our POST method values and grab any relevant data from TikTok.

  1. In the body, you’ll in put the App ID, auth code and secret. The app ID and secret can be found in the TikTok API portal, while the auth code is found in the URL above.
  2. Tiktok Ads Api PostmanNext, you’ll create a request for an access token. Once you have that, you can finally get your ad data. The POST request is sent to this address:

    https://open-api.tiktok.com/oauth/access_token/

  3. Tiktok Ads Api Postman FilledBoom! Now that you have your access token, you can fire GET requests to pull data from the TikTok API. In the key-value pairing, the key is access-token, and the value is the access token you just generated.
  4. Tiktok Ads Api Access TokenYou can now use your TikTok API endpoints to grab specific data from TikTok. Postman has a wide select of examples you can use, or you can read the official API documentation to get them yourself.

Fetch data automatically with Joinr

Now that we’ve covered the drudgingly slow step-by-step API process, it’s time to shift gears and talk about how you can save hours of time using an automatic data unification tool like Joinr. Joinr automatically connects to your TikTok ads account, and funnels your data through our ad data pipeline, where your data is cleaned and primed for analysis in Google Data Studio. It all happens in a matter of minutes, not hours–giving you more time for the things that matter. Like actual data analysis.

Get started in seconds with our free TikTok Ads connector. And if you connect more than one platform to Joinr, we’ll automatically blend all your data into a single data set. Giving you better cross-channel campaign insights.

Connect your TikTok Ads data to Google Data Studio in minutes