Get the message and its links
The gate’s message and its links without a fan: for a welcome message, a broadcast, or a button you place yourself.
Questions? [email protected]
The gate’s message and its links without a fan: for a welcome message, a broadcast, or a button you place yourself.
Questions? [email protected]
/api/external/v1/chat-gate/messagealso served at /api/external/chat-gate/messageNewThe gate’s message and its links without a fan: for a welcome message, a broadcast, or a button you place yourself.
Nothing is claimed, pinned or checked, so send it to whoever you like; a payment through the links opens the chat as usual.
text and replyMarkup are the message check would ask with, for the setting that applies to account (the creator’s without it). Both are null while Pay to Chat and Sub to Chat are off there, because the message says the gate is on. links is always there: put the tip or subscribe button under any message of your own.
Send the creator's API key as a bearer token: Authorization: Bearer dpfn_…. See Authentication & API keys.
For a creator you manage or onboarded
GET /api/external/v1/creators/{creatorId}/chat-gate/message — an agency's own key for a creator or AI persona it manages (needs canManageDrops), or your app owner's own key for an account your app onboarded. The X-Dropfans-Account header still works but is deprecated. See Acting for a creator.
| Name | Type | Required | Description |
|---|---|---|---|
account | string | Optional | Telegram user id of one of the creator’s accounts: its setting and its reported name are used. |
locale | string | Optional | A language we write (en, es, fr, pt, sv) or a Telegram language_code. English otherwise. |
accountName | string | Optional | The account’s first name for the text; defaults to the one you reported. |
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
account | string | null | The account asked about, or null. | |||||||||
mode | string | Who may chat: everyone, fans who paid (tip or drop) or subscribed, or subscribers only. One of: EVERYONE, PAY, SUB | |||||||||
locale | string | The language of the text and the button labels. | |||||||||
text | string | null | Send as plain text (no parse_mode). Null while the gate is off, or on Sub to Chat with no subscription on sale. | |||||||||
replyMarkup | object | null | The buttons that go with text, as a Bot API InlineKeyboardMarkup. Null when text is. | |||||||||
links | object | The Mini App links on their own, each { text, url }: a button label in locale and a URL.Show child attributes
|
{
"account": "5550001111",
"mode": "SUB",
"locale": "en",
"text": "❌ Mia has Sub to Chat turned on. To start chatting, tap the button below and subscribe 💬",
"replyMarkup": {
"inline_keyboard": [
[
{
"text": "🔓 Subscribe",
"url": "https://t.me/DropfansBot/app?startapp=s_mia"
}
],
[
{
"text": "Already subscribed? Tap here",
"url": "https://t.me/DropfansBot/app?startapp=cs_mia"
}
]
]
},
"links": {
"tip": {
"text": "💵 Send a tip",
"url": "https://t.me/DropfansBot/app?startapp=t_mia"
},
"subscribe": {
"text": "🔓 Subscribe",
"url": "https://t.me/DropfansBot/app?startapp=s_mia"
},
"alreadySubscribed": {
"text": "Already subscribed? Tap here",
"url": "https://t.me/DropfansBot/app?startapp=cs_mia"
}
}
}| Status | Body | When |
|---|---|---|
| 400 | {"error":"account must be a Telegram user id (digits, as a string)","code":"invalid_telegram_id"} | `account` is missing or not a Telegram user id. |
| 409 | {"error":"The creator has no username yet, so there is no page to link to.","code":"no_username"} | The creator hasn’t picked a username. |
| 401 | {"error":"Unauthorized","code":"unauthorized"} | Missing or invalid API key. |
| 403 | {"error":"This endpoint needs a key bound to an app with the chat_gate API category enabled — personal keys cannot use it.","code":"app_key_required","category":"chat_gate"} | A personal key: the chat gate answers back through app webhooks. |
| 409 | {"error":"The chat gate is for creator accounts.","code":"not_a_creator"} | The account is a fan account, suspended or banned. |
| 503 | {"error":"The chat gate is not available right now. Let the message through.","code":"unavailable"} | Something failed on our side. Fail open: let the message stand. |
| 400 | {"error":"X-Dropfans-Account must be an account id (from GET /api/external/agency/creators), not a username.","code":"invalid_account_header"} | `X-Dropfans-Account` is not an account id. |
| 400 | {"error":"X-Dropfans-Account names a different account than the path — send one or the other.","code":"account_mismatch"} | Called under /v1/creators/{creatorId}/ with an `X-Dropfans-Account` naming another account. |
| 403 | {"error":"This key cannot act for that account.","code":"account_not_managed"} | The creator in the path (or `X-Dropfans-Account`) is one this key cannot act for: no ACCEPTED management by your agency and not an account your app onboarded (or it no longer holds a key bound to your app), a key minted for one creator, or someone is suspended, banned or deleted. An unknown id gets the same answer. |
| 403 | {"error":"The agency does not have permission for this on that account.","code":"permission_denied","permission":"canManageDrops"} | For a managed creator: the agency lacks `canManageDrops` on that account. |
| 403 | {"error":"This app does not have the chat_gate API category enabled. Contact support to enable it.","code":"api_category_disabled","category":"chat_gate"} | Your app has the Pay to Chat [API category](/developers/concepts/api-categories) switched off (the default for new apps). |
Every response carries the X-RateLimit-Tier header and, on limited tiers, the per-minute and per-day trios — read X-RateLimit-Remaining and X-RateLimit-Reset instead of hardcoding limits. Details in Rate limits.
curl "https://www.dropfans.io/api/external/v1/chat-gate/message?account=5550001111&locale=en" \
-H "Authorization: Bearer $DROPFANS_API_KEY"const res = await fetch(`https://www.dropfans.io/api/external/v1/chat-gate/message?account=5550001111&locale=en`, {
headers: {
Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,
},
});
console.log(await res.json());import os
import requests
res = requests.get(
"https://www.dropfans.io/api/external/v1/chat-gate/message",
headers={"Authorization": f"Bearer {os.environ['DROPFANS_API_KEY']}"},
params={"account": "5550001111", "locale": "en"},
)
print(res.json())