# Getting started

Call the TikSign API in minutes: get an API key, call an endpoint, read the result.

Base URL: `https://api.tiksign.com`

## APIs

* [Signing API](/en/docs/signing): sign requests that go to TikTok — app (returns `x-argus`, `x-ladon`, `x-gorgon`, `x-khronos`) and web (returns `signed_url` with `X-Dynosaur`, `X-Gnarly`).
* [Web API](/en/docs/user): TikTok data (users, videos). Each call has a fixed price.

## Quick start

**Save the API key in an environment variable.** No key yet? Create one in [API Keys](/dashboard/keys). The key shows only once.```bash
export TTSIGN_KEY="sk_…"   # get the key in API Keys
```

**Sign a request.** Replace `url`, `deviceId` and `installId` with the values from your app traffic. See [Sign a TikTok request](/en/docs/signing/sign-request) for details.```bash
curl -X POST https://api.tiksign.com/api/v1/sign \
  -H "X-API-Key: $TTSIGN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6","deviceId":"7123456789012345678","installId":"7123456789012345679"}'
```

**Send the signed request to TikTok.** Call the exact `signed_url` and add every header from `headers`. This example uses jq:```bash
RESP=$(curl -s -X POST https://api.tiksign.com/api/v1/sign \
  -H "X-API-Key: $TTSIGN_KEY" -H "Content-Type: application/json" \
  -d '{"url":"https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6","deviceId":"7123456789012345678","installId":"7123456789012345679"}')

# Add all signed headers, then call the exact signed_url
mapfile -t HEADERS < <(echo "$RESP" | jq -r '.headers | to_entries[] | "\(.key): \(.value)"')
curl "$(echo "$RESP" | jq -r .signed_url)" \
  "${HEADERS[@]/#/-H}" \
  -H "Cookie: sessionid=…"
```

## Authentication

Each endpoint needs an API key. Send the key in a header of each request:

* `X-API-Key: sk_…`
* `Authorization: Bearer sk_…`

Create and revoke keys under [API Keys](/dashboard/keys). The key shows only once when you create it. Do not put the key in code that runs in the browser of your end users.

If the key is missing, wrong, or revoked, the API returns HTTP 401.

## Pricing model

TikSign uses a prepaid wallet. Each endpoint shows its own price at the top of its page. A successful call charges your wallet.

Signing API: the PAYG plan uses a graduated price by the number of requests in the month. The price drops when you use more.

| Requests in the month | Price per request |
| --- | --- |
| 0 – 10,000 req | 150 VND |
| 10,001 – 100,000 req | 120 VND |
| Over 100,000 req | 90 VND |

A 30-day plan (Basic, Unlimited) has no charge for each request.

### 30-day plans

Buy them with the money in your wallet. They have no charge for each request and only limit the requests per second.

| Plan | Fee | Rate |
| --- | --- | --- |
| Basic | 1,990,000 VND / 30 days | 10 requests / second |
| Unlimited | 6,990,000 VND / 30 days | 50 requests / second |

Web API: each endpoint has a fixed price for each call. The price is on the page of the endpoint.

Rejected requests (400, 401, 402, 429) and 502 errors of the signer are not charged.

## Error codes

An error returns JSON in the form `{ "message": "…" }`. Each endpoint lists its own errors at the end of its page. These are the common codes:

| HTTP  | Cause                                                                                          | Fix                                                                                           |
| ----- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `400` | The request is not valid, for example the URL is not a full https URL or the device is missing | Check the body and the parameters on the page of the endpoint                                 |
| `401` | The API key is missing, wrong, or revoked                                                      | Check the X-API-Key header                                                                    |
| `402` | The wallet balance is too low for the request                                                  | Top up under Wallet & plans, or buy a 30-day plan                                             |
| `429` | You are over the requests per second of your plan                                              | Wait for the time in the Retry-After header and send again; upgrade the plan for a higher RPS |
| `502` | The internal signer failed                                                                     | Try again in a few seconds; send the trace_id to support if it repeats                        |

## Rate limits

Each account has a limit of requests per second that depends on the plan. If you go over the limit, the API returns HTTP 429 with a `Retry-After` header (the seconds to wait).

| Plan | Limit |
| --- | --- |
| Pay as you go | 3 requests / second |
| Basic | 10 requests / second |
| Unlimited | 50 requests / second |

A request that is rejected with 429 is not charged. Wait for the time in `Retry-After`, then send again.

## FAQ

**Where do I find deviceId and installId?**

Capture a real request of the app with a proxy (Charles, mitmproxy, HTTP Toolkit) on a device that is logged in. Take the device_id and iid parameters from the URL.

**Do I need sdi?**

Usually no. Use it only when you want to include the state of a real device (a hex string).

**TikTok returns sc=0 but the like is not saved?**

Check that you signed the request and sent the correct body. A video like needs the body "body=null": send "body":"body=null" to /sign (the service calculates x-ss-stub), then call TikTok with a POST that has the same body and the x-ss-stub header from the response. If the body or the stub is missing, TikTok returns 200 with an empty body and silently ignores the like (verified on 16-10-2026). If the body and the stub are correct but the like is still not saved, the cause is usually a temporary limit on the account: try again later.

**Can I reuse a signature?**

No. x-khronos depends on the time of the signature, so sign again for each request.

**A WRITE request returns 200 but the body is empty?**

There are two main causes: (1) x-argus or x-ladon is missing, so add all headers from the response; (2) for a POST with a body (like = "body=null"), you did not send the body and x-ss-stub: pass "body" to /sign and send the same body when you call TikTok.
