Douyin API — Authentication — FetchLayer Docs
Documentation menu
FetchLayer FetchLayer API

Authentication

All requests use your FetchLayer API key as a Bearer token. There is no Douyin account, no OAuth flow and no developer application to apply for — everything returned is public on Douyin.

Sending requests

bash
curl -X POST https://api.fetchlayer.dev/douyin/user-profile \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"user":"MS4wLjABAAAAYOEVkUXnngwqKUvaFEGdZWxDxUD6cEbk7zYTJGMrqPA"}'

Keep your key secret

Only use API keys in server-side code and rotate a key immediately if it is exposed.

POST with a JSON body

Every route takes a JSON body over POST, so nothing sensitive travels in a URL. Unrecognised body fields are rejected with a 400 naming the field, so a typo such as usr fails loudly instead of being quietly ignored.

Authentication errors

A missing or invalid key returns HTTP 401. A key scoped to other platforms returns HTTP 403.

json
{
  "error": "Invalid API key"
}