# Sign a TikTok request

`POST https://api.tiksign.com/api/v1/sign`

- Price: from 90 VND / call
  - 0 – 10,000 req: 150 VND / call
  - 10,001 – 100,000 req: 120 VND / call
  - Over 100,000 req: 90 VND / call
- Available
- Last updated: 2026-10-17

Send the full TikTok URL and the device data. The response has `signed_url` and the signature headers to add to the real request.

**How to use it**

1. Call this endpoint with `url`, `deviceId` and `installId` from a real request of your app.
2. Call TikTok with exactly the `signed_url` from the response. Add **all** headers from `headers`.
3. Sign again for each request. `x-khronos` depends on the time of the signature, so do not reuse an old signature.

**Device used for the signature**

Take `device_id` and `iid` from the URL of a real request of your app (Burp, Charles, mitmproxy). They must match the device where the account is logged in. The service **does not use its own device**. If you have no device, use `deviceSeed` to create a fixed virtual device.

**Request with a body (for example, like a video)**

Send `body` to this endpoint so that the service calculates `x-ss-stub`. When you call TikTok, send a POST with the same body and the `x-ss-stub` header from the response. If the body or the stub is missing, TikTok returns HTTP 200 with an empty body and silently ignores the action. To like a video, use `"body": "body=null"`.

Each successful call charges the wallet by the graduated price table (PAYG plan). A 30-day plan has no charge per request.

## Authorization

- `X-API-Key: YOUR_API_KEY`
- `Authorization: Bearer YOUR_API_KEY`

## Request body

`application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | `string<uri>` | Required | Full https URL, copied as it is from a real request of the app. |
| `deviceId` | `string` (pattern: ^[0-9]{5,21}$) | Optional | `device_id` of the device that is logged in (5 to 21 digits). It is in the captured URL. Required if you do not use `deviceSeed`. |
| `installId` | `string` (pattern: ^[0-9]{5,21}$) | Optional | `iid` of the same device (5 to 21 digits). Required if you do not use `deviceSeed`. |
| `deviceSeed` | `string` (minLength: 4, maxLength: 64) | Optional | Use it instead of `deviceId` + `installId`: a virtual device that stays the same for one seed (4 to 64 characters). |
| `sdi` | `string` | Optional | State of the real device (hex string). You do not need it in most cases. Use it only to sign for the exact device you captured. |
| `cookie` | `string` | Optional | TikTok session cookie. |
| `ua` | `string` | Optional | User-Agent of the app. |
| `body` | `string` | Optional | Body of a POST request. The server calculates `x-ss-stub` from this body. |
| `headers` | `map<string, string>` | Optional | The other headers that you will send, so that the signature covers them. |

```json
{
  "url": "https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6",
  "deviceId": "7123456789012345678",
  "installId": "7123456789012345679"
}
```

## Responses

### 200

The signature is ready.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `trace_id` | `string` | Required | Trace code. Find the call again in Logs. |
| `host` | `string` | Required | Host of the signed URL. |
| `signed_url` | `string` | Required | Call TikTok with exactly this URL (`aid`, `device_id` and `iid` are added). |
| `device` | `object` | Required | The device that the service used for the signature. |
| `device.device_id` | `string` | Required | `device_id` used for the signature. |
| `device.install_id` | `string` | Required | `iid` used for the signature. |
| `device.app_version` | `string` | Required | App version used for the signature. |
| `headers` | `map<string, string>` | Required | Add all of them to the request that you send to TikTok: `x-argus`, `x-gorgon`, `x-khronos`, `x-ladon` (and `x-ss-stub` when there is a body). |
| `latency_ms` | `integer` | Required | Time to sign, in milliseconds. |

```json
{
  "trace_id": "tr_2f7c9d1e5a6b4c3d",
  "host": "api22-normal-c-alisg.tiktokv.com",
  "signed_url": "https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6&aid=1233&device_id=7123456789012345678&iid=7123456789012345679",
  "device": {
    "device_id": "7123456789012345678",
    "install_id": "7123456789012345679",
    "app_version": "47.0.3"
  },
  "headers": {
    "x-argus": "gkV2B9jG2ka…",
    "x-gorgon": "8404209800…",
    "x-khronos": "1760512350",
    "x-ladon": "z0+2dGXE3Bza…"
  },
  "latency_ms": 14
}
```

## Errors

- **400**: The URL is not a full https URL, or the device data is missing. Fix: send an https `url` with `deviceId` and `installId` (or `deviceSeed`).
- **401**: The API key is missing, wrong, or revoked. Fix: check the `X-API-Key` header.
- **402**: PAYG plan: the wallet balance is too low for the request. Fix: top up under Wallet & plans, or buy a 30-day plan.
- **429**: You are over the requests per second of your plan. Fix: wait for the time in the `Retry-After` header and send again, or upgrade the plan for a higher RPS.
- **502**: The internal signer failed. Fix: try again in a few seconds. If it repeats, send the `trace_id` to support. A failed call is not charged.

## Request example

```bash
curl -X POST 'https://api.tiksign.com/api/v1/sign' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6",
  "deviceId": "7123456789012345678",
  "installId": "7123456789012345679"
}'
```

```javascript
const response = await fetch("https://api.tiksign.com/api/v1/sign", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6",
    "deviceId": "7123456789012345678",
    "installId": "7123456789012345679"
  }),
});
const data = await response.json();
console.log(response.status, data);
```

```python
import requests

response = requests.post(
    "https://api.tiksign.com/api/v1/sign",
    headers={
        "X-API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "url": "https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6",
        "deviceId": "7123456789012345678",
        "installId": "7123456789012345679",
    },
    timeout=10,
)
print(response.status_code, response.json())
```

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	body := []byte(`{
  "url": "https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/?count=6",
  "deviceId": "7123456789012345678",
  "installId": "7123456789012345679"
}`)
	req, err := http.NewRequest("POST", "https://api.tiksign.com/api/v1/sign", bytes.NewReader(body))
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", "YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, err := io.ReadAll(res.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode, string(data))
}
```
