# Sign a TikTok web request

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

- 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 a full TikTok web URL (`www.tiktok.com`). The response has the `signed_url` with `X-Dynosaur`, `X-Gnarly`, `msToken` and `X-Bogus=1` added.

**How to use it**

1. Call this endpoint with `url` — the full URL with all the parameters that your page sends — and `cookie` (your session, so the signature uses the right `msToken`).
2. Call TikTok with exactly the `signed_url`, your session cookie, and the `user_agent` and `referer` from the response.
3. Sign again for each request: the signature depends on the URL and the time.

No device is needed. For a POST, send `body` too so that the signature covers it.

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 of the TikTok web request, with all the parameters that the page sends. |
| `cookie` | `string` | Optional | Your TikTok web session cookie — the service takes `msToken` from it so the signature matches the session that will send the request. Leave it out and the service creates one. |
| `body` | `string` | Optional | Body of a POST request, if any. The signature covers the body, so it must match when you send it. |
| `referer` | `string<uri>` | Optional | Context page (referer). Defaults to `https://www.tiktok.com/`. |
| `profile` | `string` (enum: desktop \| mobile, default: "desktop") | Optional | Device profile — picks the default `user_agent`. |
| `ua` | `string` | Optional | Custom User-Agent (it must match the UA that you send to TikTok). |
| `msToken` | `string` | Optional | msToken of your session. Leave it out and the service creates one — some endpoints need an msToken that your session received. |

```json
{
  "url": "https://www.tiktok.com/api/comment/list/?aweme_id=7663366594881457430&count=20&cursor=0",
  "referer": "https://www.tiktok.com/@tiksign/video/7663366594881457430",
  "profile": "desktop"
}
```

## 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 (`X-Dynosaur`, `msToken`, `X-Bogus=1` and `X-Gnarly` are added). |
| `profile` | `string` (enum: desktop \| mobile) | Required | Device profile used for the signature. |
| `user_agent` | `string` | Required | Send the request with exactly this User-Agent (the signature is tied to the UA). |
| `referer` | `string<uri>` | Required | Send the request with this referer (the home page is used when you do not pass one). |
| `latency_ms` | `integer` | Required | Time to sign, in milliseconds. |

```json
{
  "trace_id": "tr_2f7c9d1e5a6b4c3d",
  "host": "www.tiktok.com",
  "signed_url": "https://www.tiktok.com/api/comment/list/?aweme_id=7663366594881457430&count=20&cursor=0&X-Dynosaur=MCxbbHqtL3e9acYBNEExdco17Bp…&msToken=7c0b…==&X-Bogus=1&X-Gnarly=gpaK7uw…",
  "profile": "desktop",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.0.0 Safari/537.36",
  "referer": "https://www.tiktok.com/@tiksign",
  "latency_ms": 3
}
```

## Errors

- **400**: The URL is not a full https URL, is not on `*.tiktok.com`, has no query string, or `profile` is wrong. Fix: send a full https `url` with the parameters that your page sends.
- **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 signing worker 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/web' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://www.tiktok.com/api/comment/list/?aweme_id=7663366594881457430&count=20&cursor=0",
  "referer": "https://www.tiktok.com/@tiksign/video/7663366594881457430",
  "profile": "desktop"
}'
```

```javascript
const response = await fetch("https://api.tiksign.com/api/v1/sign/web", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://www.tiktok.com/api/comment/list/?aweme_id=7663366594881457430&count=20&cursor=0",
    "referer": "https://www.tiktok.com/@tiksign/video/7663366594881457430",
    "profile": "desktop"
  }),
});
const data = await response.json();
console.log(response.status, data);
```

```python
import requests

response = requests.post(
    "https://api.tiksign.com/api/v1/sign/web",
    headers={
        "X-API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "url": "https://www.tiktok.com/api/comment/list/?aweme_id=7663366594881457430&count=20&cursor=0",
        "referer": "https://www.tiktok.com/@tiksign/video/7663366594881457430",
        "profile": "desktop",
    },
    timeout=10,
)
print(response.status_code, response.json())
```

```go
package main

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

func main() {
	body := []byte(`{
  "url": "https://www.tiktok.com/api/comment/list/?aweme_id=7663366594881457430&count=20&cursor=0",
  "referer": "https://www.tiktok.com/@tiksign/video/7663366594881457430",
  "profile": "desktop"
}`)
	req, err := http.NewRequest("POST", "https://api.tiksign.com/api/v1/sign/web", 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))
}
```
