# Douyin Index User ID Encryption API

> Converts a standard numeric Douyin uid into the encrypted user_id required by Douyin Index endpoints for debugging or custom queries.

Source: https://www.sandbase.ai/model/douyin/index/encrypt-user-id
API reference: https://www.sandbase.ai/model/douyin/index/encrypt-user-id/docs

## Facts

- Provider: Douyin
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/douyin/index/encrypt-user-id`
- 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/index/encrypt-user-id` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

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

## FAQ

### How do I use the Douyin Index User ID Encryption API?

Send a POST request to https://api.sandbase.ai/v1/api/douyin/index/encrypt-user-id 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 Index User ID Encryption 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 Index User ID Encryption API accept?

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

### What does the Douyin Index User ID Encryption API return?

A JSON response returned in the same HTTP request (synchronous).

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

No. Douyin Index User ID Encryption 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 Index User ID Encryption API

Convert a numeric Douyin user identifier into an internal encrypted format by passing `uid`. This provides direct access to the encrypted identifier required by Douyin Index queries.

#### Use cases

- Look up encrypted user identifiers for debugging Douyin Index integration issues.
- Convert numeric user IDs for manual queries against Douyin Index endpoints.
- Resolve internal user ID formats without calling full daren analytics endpoints.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/encrypt-user-id" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"uid": "92769419069"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `uid` | string | Yes | Douyin uid, numeric string |

#### Notes

- The required `uid` parameter expects a numeric string representation of the Douyin account ID.

#### Related APIs

- [Douyin Index Area List](/model/douyin/index/all-area): Returns the complete list of supported geographic areas available for Douyin Index queries.
- [Douyin Index Valid Dates](/model/douyin/index/all-valid-date): Returns the latest valid dates available for each data type in Douyin Index.
- [Douyin Brand Popularity Cycles](/model/douyin/index/brand-cycles): Returns periodic brand popularity and cycle analysis data across platforms for a specified brand name and date range.
