Skip to content
Last updated

Guides For Creating Tiktok Marketing Api Developer Account And Application

What is this guide for ?

  • To create a Tiktok developer account and Tiktok developer application
  • To use Titkok developer application to generate access token

Prerequisites

User Guide:

  1. From the TikTok Marketing API homepage, select the Register button on the top right.

  1. Type in your login credentials and confirm your password.
  2. Select Send Code.

  1. Next, you will receive an SMS with a verification code. Type the code into the Verification Code field and select **Sign Up.**Select Send Code if you do not receive a verification code.

  1. After correctly entering the verification code, you are redirected to the login screen, where you can use your new credentials.

  1. Slide the bar to align with the displayed image to complete the verification steps.

You are now logged into the TikTok Marketing API homepage.

  1. Select Become a Developer from the top-right menu.

  1. A new screen appears. Type in your login information and choose Direct Advertiser in the field. What best describes you or your company. Select Send Code to verify your email and phone.
  2. Select Next.

  1. Type your information, including your Company Name, Company Website, etc. Select Next.

  1. Navigate to the Create Application pane. Type your application name and description.
  2. Type your local IP address in the Advertiser redirect URL. You might need certain permissions. The following example identifies possible permissions.
  3. Select Confirm.

  1. You are redirected to the My Apps page, where you can view the status of your application. Application approval might take two or three business days.

Obtain your App ID and Secret to Get your Access Token

You must have your App ID and Secret before you can get your TikTok Access Token.

  1. From the TikTok Marketing API homepage, select Log In in the top right.
  2. Select the My Apps to view your application.
  3. Select the app name you want.

  1. You can view basic information on the new screen, including the App ID and Secret. Take note of this information for later.
  2. Select Copy to retain the Secret on your clipboard.

  1. On the current application's screen, scroll down to Authorized URL.

  1. Copy the Authorized URL, paste it into an open web browser, and press Enter. You will be prompted to log in to your TikTok Ads Account, and then a new screen will appear. select Confirm.

  1. You will be redirected to a non-existent webpage. Copy the URL in the webpage and get the auth_code value.

For example, your URL might look like this:

http://192.168.101.1/callback?auth_code=11111&code=11111&state=your_custom_params
  1. Using your preferred API request tool, such as POSTMAN, you can send a request to https://business-api.tiktok.com/open_api/v1.2/oauth2/access_token/ with a request body as shown in the following example.
{
    "app_id" : "{your_app_id}",
    "auth_code" : "{auth_code_in_above_step}",
    "secret" : "{your_app_secret}"
}
  1. Next, select Send.
  2. Alternatively, you may use cURL with the following command
$ curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.2/oauth2/access_token/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "app_id" : "{your_app_id}",
    "auth_code" : "{auth_code_in_above_step}",
    "secret" : "{your_app_secret}"
}'
  1. After you receive the response with the access_token and advertiser_ids, as in the following example, you are ready to integrate with TikTok.
{
    "message": "OK",
    "code": 0,
    "data": {
        "access_token": "********************",
        "scope": [
            1,
            3,
            4
        ],
        "advertiser_ids": [
        ]
    },
    "request_id": "11111"
}