一键导入
blink-backend
Blink Backend — Hono server on CF Workers for webhooks, server-side secrets, custom APIs. Pro+ only. Deploy via CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Blink Backend — Hono server on CF Workers for webhooks, server-side secrets, custom APIs. Pro+ only. Deploy via CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
OAuth connector system for 38+ third-party services. Execute API calls to Google, Notion, Slack, Discord, GitHub, Stripe, Jira, HubSpot, Salesforce, LinkedIn, and more.
End-to-end guide for building and shipping a Blink app. Project setup, SDK init, auth, database, backend, deploy, and custom domains. Index to all other skills.
Authentication with managed and headless modes. Social providers, email/password, magic links, RBAC.
Build and deploy Blink apps to production. Preview vs production deploys, deploy pipeline, static site hosting.
Blink Claw agent management — managed AI agent hosting on Fly.io. List agents, check status, manage secrets. For autonomous agents, Telegram/Discord bots, and scheduled workflows.
AI Gateway for text generation, image generation/editing, video generation, text-to-speech, audio transcription, and AI phone calls. Unified access to 50+ models.
| name | blink-backend |
| description | Blink Backend — Hono server on CF Workers for webhooks, server-side secrets, custom APIs. Pro+ only. Deploy via CLI. |
blink_backend_status · blink_backend_deploy · blink_backend_logs
blink.db instead# Check backend eligibility (Pro/Max/Team)
blink backend status
# Create the entry point
mkdir -p backend
# Write backend/index.ts (see below)
# Deploy
blink backend deploy
# View logs
blink backend logs
backend/
├── index.ts ← REQUIRED: export default Hono app
├── routes/
│ ├── stripe.ts
│ └── webhooks.ts
└── lib/
└── auth.ts
backend/index.ts (Required Entry Point)import { Hono } from "hono"
import { cors } from "hono/cors"
import { createClient } from "@blinkdotnew/sdk"
const app = new Hono()
app.use("*", cors())
const getBlink = (env: Record<string, string>) =>
createClient({
projectId: env.BLINK_PROJECT_ID,
secretKey: env.BLINK_SECRET_KEY, // server key, not publishableKey
})
app.get("/health", (c) => c.json({ ok: true }))
app.post("/api/example", async (c) => {
const blink = getBlink(c.env as Record<string, string>)
const body = await c.req.json()
return c.json({ success: true })
})
export default app
Auto-injected (never hardcode): BLINK_PROJECT_ID, BLINK_SECRET_KEY, BLINK_PUBLISHABLE_KEY
User secrets (third-party keys): Add via project settings or CLI, access as c.env.MY_SECRET.
app.post("/api/protected", async (c) => {
const blink = getBlink(c.env as Record<string, string>)
const auth = await blink.auth.verifyToken(c.req.header("Authorization"))
if (!auth.valid) return c.json({ error: auth.error }, 401)
return c.json({ userId: auth.userId })
})
// Direct fetch
const res = await fetch("https://{projectId8}.backend.blink.new/api/example", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ key: "value" }),
})
// Via SDK
const data = await blink.functions.invoke("api/example", { body: { key: "value" } })
projectId8 = last 8 chars of the full project ID.
# 1. Check eligibility
blink backend status
# 2. Write backend/index.ts
# 3. Deploy (reads all backend/ files, bundles with esbuild, deploys to CF Workers)
blink backend deploy
# 4. URL is printed: https://{projectId8}.backend.blink.new
| Error | Cause | Fix |
|---|---|---|
BACKEND_REQUIRES_PRO | Free/Starter workspace | Upgrade to Pro+ |
MISSING_ENTRYPOINT | No backend/index.ts | Create with export default app |
| CORS error | Missing middleware | Add app.use("*", cors()) |
| 401 on blink-apis | Wrong key | Use secretKey, not publishableKey |
backend/index.ts exports default appapp.use("*", cors()) presentsecretKey in createClient (not publishableKey)blink backend deployfetch() calls