> ## Documentation Index
> Fetch the complete documentation index at: https://www.dropfans.io/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/external/links — Canonical profile, tip, subscribe and buy links

> Every shareable link for the creator behind the key, in one call — never template Dropfans URLs by hand.

- Source: https://www.dropfans.io/developers/reference/get-links
- Section: API reference
- OpenAPI: https://www.dropfans.io/developers/openapi.json

Every shareable link for the creator behind the key, in one call — never template Dropfans URLs by hand.

The `web` block always exists. The `telegram` block (Mini App deep links) is **null when the shared Dropfans bot is not configured** — fall back to the web links. Fields ending in `Template` contain literal placeholders to substitute: `{usd}` (whole dollars, web tip), `{cents}` (Telegram tip — note the unit difference), `{productId}` (buy links).

Tip prefill bounds: web `?tip=<usd>` opens the sheet prefilled when the amount is between $5 and $750; out-of-range amounts open the sheet unfilled rather than erroring.

## Authentication

`Authorization: Bearer dpfn_...` — an API key generated in the creator's dashboard (Vault → API Connect). One key = one creator. Missing or invalid keys return 401 `{"error":"Unauthorized","code":"unauthorized"}`.

## Responses

### 200

The creator’s links.

| Field | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | The creator’s @handle the links are built for. |
| `web` | object | yes | Canonical web links. Templates contain literal placeholders — substitute before use. |
| `web.profile` | string | yes | The creator’s public profile. |
| `web.tip` | string | yes | Opens the profile with the tip sheet open. |
| `web.tipTemplate` | string | yes | Tip link with the amount prefilled — replace `{usd}` with whole US dollars. Amounts outside the allowed range open the sheet unfilled. |
| `web.subscribe` | string | yes | Opens the profile with the subscribe sheet open. |
| `web.buyTemplate` | string | yes | Checkout link for any drop — replace `{productId}` with the id from create-drop. |
| `telegram` | object \\| null |  | Telegram Mini App deep links. **Null when the shared Dropfans bot is not configured** — fall back to the web links. |
| `telegram.bot` | string | yes | The shared bot username, without @. |
| `telegram.profile` | string | yes | Opens the creator’s Mini App profile. |
| `telegram.tip` | string | yes | Opens the Mini App tip sheet. |
| `telegram.tipTemplate` | string | yes | Tip prefilled — replace `{cents}` with the amount in **cents** (the web template takes dollars; this one takes cents). |
| `telegram.subscribe` | string | yes | Opens the Mini App subscribe flow. |
| `telegram.spin` | string | yes | Opens the Lucky Wheel (when enabled for the creator). |
| `telegram.buyTemplate` | string | yes | Mini App checkout for any drop — replace `{productId}`. |

```json
{
  "username": "valeria",
  "web": {
    "profile": "https://www.dropfans.io/u/valeria",
    "tip": "https://www.dropfans.io/u/valeria?tip=1",
    "tipTemplate": "https://www.dropfans.io/u/valeria?tip={usd}",
    "subscribe": "https://www.dropfans.io/u/valeria?subscribe=1",
    "buyTemplate": "https://www.dropfans.io/buy/{productId}"
  },
  "telegram": {
    "bot": "DropfansBot",
    "profile": "https://t.me/DropfansBot/app?startapp=p_valeria",
    "tip": "https://t.me/DropfansBot/app?startapp=t_valeria",
    "tipTemplate": "https://t.me/DropfansBot/app?startapp=pt_{cents}_valeria",
    "subscribe": "https://t.me/DropfansBot/app?startapp=s_valeria",
    "spin": "https://t.me/DropfansBot/app?startapp=w_valeria",
    "buyTemplate": "https://t.me/DropfansBot/app?startapp=b_{productId}"
  }
}
```

## Errors

| Status | Body | When |
|---|---|---|
| 401 | `{"error":"Unauthorized","code":"unauthorized"}` | Missing or invalid API key. |
| 409 | `{"error":"Set a username first","code":"username_required"}` | The creator has no username yet — every link embeds it. Have the creator pick a handle in their Dropfans settings, then retry. |

## Notes

There is no endpoint to create a checkout session or an arbitrary-amount payment link: buyers pay through these pages/Mini App flows. The tip templates are the closest thing to a "payment link" — the amount is prefilled, the buyer confirms on Dropfans.

## Rate limiting

Per-key fixed windows by tier (Personal 60/min · 5,000/day; approved apps 300/min · 50,000/day; Dropfans-operated integrations exempt). Read the live values from X-RateLimit-Tier, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and their -Day variants; a 429 carries Retry-After and `{"error":"Rate limit exceeded","code":"rate_limited"}`. See [Rate limits](https://www.dropfans.io/developers/concepts/rate-limits.md).

## Code samples

### curl

```bash
curl "https://www.dropfans.io/api/external/links" \
  -H "Authorization: Bearer $DROPFANS_API_KEY"
```

### Node

```javascript
const res = await fetch(`https://www.dropfans.io/api/external/links`, {
  headers: {
    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,
  },
});
console.log(await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://www.dropfans.io/api/external/links",
    headers={"Authorization": f"Bearer {os.environ['DROPFANS_API_KEY']}"},
)
print(res.json())
```

## OpenAPI

```json
{
  "method": "GET",
  "path": "/api/external/links",
  "operationId": "getLinks",
  "tags": [
    "links"
  ],
  "summary": "Canonical profile, tip, subscribe and buy links",
  "description": "Every shareable link for the creator behind the key, in one call — never template Dropfans URLs by hand.\n\nThe `web` block always exists. The `telegram` block (Mini App deep links) is **null when the shared Dropfans bot is not configured** — fall back to the web links. Fields ending in `Template` contain literal placeholders to substitute: `{usd}` (whole dollars, web tip), `{cents}` (Telegram tip — note the unit difference), `{productId}` (buy links).\n\nTip prefill bounds: web `?tip=<usd>` opens the sheet prefilled when the amount is between $5 and $750; out-of-range amounts open the sheet unfilled rather than erroring.",
  "responses": {
    "200": {
      "description": "The creator’s links.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string",
                "description": "The creator’s @handle the links are built for.",
                "example": "valeria"
              },
              "web": {
                "type": "object",
                "properties": {
                  "profile": {
                    "type": "string",
                    "description": "The creator’s public profile.",
                    "format": "uri",
                    "example": "https://www.dropfans.io/u/valeria"
                  },
                  "tip": {
                    "type": "string",
                    "description": "Opens the profile with the tip sheet open.",
                    "format": "uri",
                    "example": "https://www.dropfans.io/u/valeria?tip=1"
                  },
                  "tipTemplate": {
                    "type": "string",
                    "description": "Tip link with the amount prefilled — replace `{usd}` with whole US dollars. Amounts outside the allowed range open the sheet unfilled.",
                    "example": "https://www.dropfans.io/u/valeria?tip={usd}"
                  },
                  "subscribe": {
                    "type": "string",
                    "description": "Opens the profile with the subscribe sheet open.",
                    "format": "uri",
                    "example": "https://www.dropfans.io/u/valeria?subscribe=1"
                  },
                  "buyTemplate": {
                    "type": "string",
                    "description": "Checkout link for any drop — replace `{productId}` with the id from create-drop.",
                    "example": "https://www.dropfans.io/buy/{productId}"
                  }
                },
                "required": [
                  "profile",
                  "tip",
                  "tipTemplate",
                  "subscribe",
                  "buyTemplate"
                ],
                "description": "Canonical web links. Templates contain literal placeholders — substitute before use."
              },
              "telegram": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "bot": {
                    "type": "string",
                    "description": "The shared bot username, without @.",
                    "example": "DropfansBot"
                  },
                  "profile": {
                    "type": "string",
                    "description": "Opens the creator’s Mini App profile.",
                    "format": "uri",
                    "example": "https://t.me/DropfansBot/app?startapp=p_valeria"
                  },
                  "tip": {
                    "type": "string",
                    "description": "Opens the Mini App tip sheet.",
                    "format": "uri",
                    "example": "https://t.me/DropfansBot/app?startapp=t_valeria"
                  },
                  "tipTemplate": {
                    "type": "string",
                    "description": "Tip prefilled — replace `{cents}` with the amount in **cents** (the web template takes dollars; this one takes cents).",
                    "example": "https://t.me/DropfansBot/app?startapp=pt_{cents}_valeria"
                  },
                  "subscribe": {
                    "type": "string",
                    "description": "Opens the Mini App subscribe flow.",
                    "format": "uri",
                    "example": "https://t.me/DropfansBot/app?startapp=s_valeria"
                  },
                  "spin": {
                    "type": "string",
                    "description": "Opens the Lucky Wheel (when enabled for the creator).",
                    "format": "uri",
                    "example": "https://t.me/DropfansBot/app?startapp=w_valeria"
                  },
                  "buyTemplate": {
                    "type": "string",
                    "description": "Mini App checkout for any drop — replace `{productId}`.",
                    "example": "https://t.me/DropfansBot/app?startapp=b_{productId}"
                  }
                },
                "required": [
                  "bot",
                  "profile",
                  "tip",
                  "tipTemplate",
                  "subscribe",
                  "spin",
                  "buyTemplate"
                ],
                "description": "Telegram Mini App deep links. **Null when the shared Dropfans bot is not configured** — fall back to the web links."
              }
            },
            "required": [
              "username",
              "web"
            ]
          },
          "example": {
            "username": "valeria",
            "web": {
              "profile": "https://www.dropfans.io/u/valeria",
              "tip": "https://www.dropfans.io/u/valeria?tip=1",
              "tipTemplate": "https://www.dropfans.io/u/valeria?tip={usd}",
              "subscribe": "https://www.dropfans.io/u/valeria?subscribe=1",
              "buyTemplate": "https://www.dropfans.io/buy/{productId}"
            },
            "telegram": {
              "bot": "DropfansBot",
              "profile": "https://t.me/DropfansBot/app?startapp=p_valeria",
              "tip": "https://t.me/DropfansBot/app?startapp=t_valeria",
              "tipTemplate": "https://t.me/DropfansBot/app?startapp=pt_{cents}_valeria",
              "subscribe": "https://t.me/DropfansBot/app?startapp=s_valeria",
              "spin": "https://t.me/DropfansBot/app?startapp=w_valeria",
              "buyTemplate": "https://t.me/DropfansBot/app?startapp=b_{productId}"
            }
          }
        }
      }
    },
    "401": {
      "description": "Missing or invalid API key.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Unauthorized",
            "code": "unauthorized"
          }
        }
      }
    },
    "403": {
      "description": "The app this key belongs to has been suspended by Dropfans. Every request fails with this until the app is reinstated — surface it to the creator and contact Dropfans.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "This integration has been suspended by Dropfans. Contact the app developer.",
            "code": "app_suspended"
          }
        }
      }
    },
    "409": {
      "description": "The creator has no username yet — every link embeds it. Have the creator pick a handle in their Dropfans settings, then retry.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Set a username first",
            "code": "username_required"
          }
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded for the current minute or day window. Wait Retry-After seconds and retry.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "Retry-After": {
          "description": "Seconds to wait before retrying (sent with 429s).",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Rate limit exceeded",
            "code": "rate_limited"
          }
        }
      }
    }
  },
  "x-codeSamples": [
    {
      "lang": "cURL",
      "label": "curl",
      "source": "curl \"https://www.dropfans.io/api/external/links\" \\\n  -H \"Authorization: Bearer $DROPFANS_API_KEY\""
    },
    {
      "lang": "JavaScript",
      "label": "Node",
      "source": "const res = await fetch(`https://www.dropfans.io/api/external/links`, {\n  headers: {\n    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,\n  },\n});\nconsole.log(await res.json());"
    },
    {
      "lang": "Python",
      "source": "import os\nimport requests\n\nres = requests.get(\n    \"https://www.dropfans.io/api/external/links\",\n    headers={\"Authorization\": f\"Bearer {os.environ['DROPFANS_API_KEY']}\"},\n)\nprint(res.json())"
    }
  ],
  "x-dropfans-docs": "https://www.dropfans.io/developers/reference/get-links"
}
```

---

Previous: [Earnings stats, chart and recent transactions](https://www.dropfans.io/developers/reference/get-earnings.md) · Next: [Read the Telegram notification status](https://www.dropfans.io/developers/reference/get-notifications.md) · All pages: [llms.txt](https://www.dropfans.io/developers/llms.txt)
