# Douyin Direct Message Deep Link API

> Generates a Douyin deep link to open the mobile application directly to a user conversation. Requires the target user's uid and sec_uid to return a shortened URL.

Source: https://www.sandbase.ai/apis/douyin/app-v3/open-app-to-send-private-message
API reference: https://www.sandbase.ai/apis/douyin/app-v3/open-app-to-send-private-message/docs

## Facts

- Provider: Douyin
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/douyin/app-v3/open-app-to-send-private-message`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, douyin
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/douyin/app-v3/open-app-to-send-private-message` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `sec_uid` | string | yes |  |
| `uid` | string | yes |  |

## FAQ

### How do I use the Douyin Direct Message Deep Link API?

Send a POST request to https://api.sandbase.ai/v1/api/douyin/app-v3/open-app-to-send-private-message with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Douyin Direct Message Deep Link API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Douyin Direct Message Deep Link API accept?

Required: sec_uid (string) and uid (string). The Parameters table and the Playground on this page list every field.

### What does the Douyin Direct Message Deep Link API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Douyin developer account or API key?

No. Douyin Direct Message Deep Link runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Douyin API access separately.

## README

### Douyin Direct Message Deep Link API

Generates a short deep link that launches the Douyin application to message a targeted account using `uid` and `sec_uid`.

#### Use cases

- Direct users to chat with official brand accounts in the Douyin app.
- Guide audience members from external websites into native app conversations.
- Facilitate one-click messaging workflows for customer support.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/douyin/app-v3/open-app-to-send-private-message" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sec_uid": "MS4wLjABAAAAr52fXcfmzqOZJM_smap9Uuxtm16h8BupkCVaCt89BENq3E91mHCvtz5Z5TkXPHq_", "uid": "92769419069"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `uid` | string | Yes | User id |
| `sec_uid` | string | Yes | User sec_uid |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "short_url": "https://v.douyin.com/Zy_7aAP2O2w/",
  "status": "success"
}
```

#### Notes

- Both `uid` and `sec_uid` are required to target the account.

#### Related APIs

- [Douyin Brand Hot Search List](/model/douyin/app-v3/brand-hot-search-list): Returns the current Douyin brand hot search list and category data.
- [Douyin Brand Hot Search List Detail](/model/douyin/app-v3/brand-hot-search-list-detail): Returns detailed brand hot search list data from Douyin for a specific category.
- [Douyin Short Link Generator](/model/douyin/app-v3/generate-short-url): Converts a standard Douyin web link into a shortened Douyin URL.
