Docs
TikTok Minis Server APIs Overview
TikTok Minis Server APIs (open.tiktokapis.com) is a secure, backend-only suite of endpoints that manages identity and commerce for TikTok Minis (mini apps and mini games) via OAuth v2 and scope-based permissions. It provides OAuth token retrieval, scope-gated user info retrieval, order creation and management, and pricing. Your backend stores and manages tokens and trade orders.
TikTok Minis Server API serves both mini apps (such as mini dramas) and mini games use cases.
Category | Function | Description |
Fetch an access token using an authorization code | Exchanges the temporary | |
Refresh an access token using a refresh token | Obtain a new | |
Revoke access | Disconnects your application from a user's TikTok account | |
Get user info | Retrieve basic profile information for an authorized TikTok user | |
Get recharge tiers | Query the details and pricing of available BEANS recharge packages (tiers) offered by TikTok | |
Create an order | Register an upcoming payment order in your system with the TikTok server to generate a secure | |
Query an order | Track the status of a specific payment order created on the TikTok server | |
Check redeem amounts | Verify if a list of requested Beans amounts (prices) for their products complies with TikTok's current pricing policy and restrictions | |
Create a subscription | Initiates a new subscription purchase for a user by providing a tier ID and partner order information. | |
Reactivate subscription | Allows a user to reactivate an existing subscription using their current subscription ID. | |
Get active subscription list | Retrieves a list of all currently active subscriptions associated with the authorized TikTok user. | |
Get subscription info | Returns detailed status and metadata for a specific subscription based on a TikTok trade order ID. | |
Get trade order Info | Fetches the current status and timing details for a specific transaction. | |
Get subscription tier info | Provides pricing, currency, and billing cycle details for specific subscription tier IDs across different platforms. |
Request details
TikTok Minis Server APIs only allow the GET and POST methods.
All TikTok Minis Server APIs require the sender to set the HTTP headers correctly. Without specific guidance, all HTTP requests shall have the following header:
Key | Type | Description | Example | Required |
Authorization | string | The token that bears the authorization of the TikTok user, which is obtained through /oauth/access_token/. | Bearer act.example12345Example12345Example | TRUE |
Response details
TikTok Minis Server API supports standard response code:
Code | Description |
200 | Success |
4xx | Client Error |
5xx | Server Error |
All response bodies will be in JSON format. There will be two parts in the response body: data and error
The data field will vary among requests, while the error field will remain the same with a fixed format:
Key | Type | Description |
code | string | The error code. You can find the full list of possible error codes here |
message | string | The detailed error message in readable words works as a supplement for you to understand the error |
log_id | string | The ID of the log which is related to this request. Please pass this id to TikTok support team if you've faced any problem that you believe is not caused by your side. |
For example:
{
"data": {},
"error": {
"code": "access_token_invalid",
"message": "The access token is invalid or not found in the request.",
"log_id": "example_log_id"
}
}