# PushBear 已停止服务：迁移到 Server酱的完整指南

> pushbear.ftqq.com 已停止服务，老的 /sub?sendkey=&text=&desp= 接口不再可用。本文给出 PushBear 到 Server酱 的参数对照表和各语言改造示例——多数情况下只需要换一个 URL，text 和 desp 参数名可以原样保留。

- 网页版：https://sct.ftqq.com/pushbear/
- 更新日期：2026-07-28

# PushBear 已停止服务：迁移到 Server酱

> 一句话答案：`https://pushbear.ftqq.com/sub?sendkey=KEY&text=标题&desp=正文` 已经不能用了。改成 `https://sctapi.ftqq.com/{SENDKEY}.send`，把 SendKey 从查询参数移到 URL 路径里，`text` 和 `desp` 两个参数名**可以原样保留**——Server酱 接受 `text` 作为 `title` 的别名。换一行 URL 就完成迁移。

PushBear 和 Server酱 都出自方糖气球。PushBear 已经停止服务，能力由 Server酱（sct.ftqq.com）承接，注册仍然免费。

## 接口对照

| | PushBear（已停止） | Server酱 Turbo |
| --- | --- | --- |
| 接口地址 | `https://pushbear.ftqq.com/sub` | `https://sctapi.ftqq.com/{SENDKEY}.send` |
| SendKey 位置 | 查询参数 `sendkey=` | URL 路径中 |
| 标题参数 | `text` | `title`（也接受 `text`） |
| 正文参数 | `desp` | `desp`（也接受 `content`） |
| 请求方式 | GET / POST | GET / POST 均可 |
| 正文格式 | 纯文本 | Markdown（表格、图片、代码块） |
| 返回 | JSON | JSON，`code` 为 0 表示成功 |

关键点：**参数名不用改**。要改的只有两处——域名，以及把 sendkey 从查询串挪进路径。

## 三步迁移

**第 1 步**：到 [sct.ftqq.com](https://sct.ftqq.com/) 微信扫码登录，在 [SendKey 页面](https://sct.ftqq.com/sendkey) 复制新的 SendKey。它以 `SCT` 开头，和老的 PushBear sendkey 不通用。

**第 2 步**：在代码里搜索 `pushbear.ftqq.com`，把请求地址换掉。

**第 3 步**：跑一次，确认手机收到消息，并检查返回的 `code` 是 0。

## 改造前后对照

```bash
# 旧
curl "https://pushbear.ftqq.com/sub?sendkey=${KEY}&text=备份完成&desp=数据库备份 2.1GB"

# 新
curl -X POST "https://sctapi.ftqq.com/${SENDKEY}.send" \
     --data-urlencode "title=备份完成" \
     --data-urlencode "desp=数据库备份 2.1GB"
```

```python
# 旧
requests.get("https://pushbear.ftqq.com/sub",
             params={"sendkey": KEY, "text": title, "desp": content})

# 新
requests.post(f"https://sctapi.ftqq.com/{SENDKEY}.send",
              data={"title": title, "desp": content})

# 或者用官方 SDK：pip install serverchan-sdk
from serverchan_sdk import sc_send
sc_send(SENDKEY, title, content)
```

```php
// 旧
file_get_contents("https://pushbear.ftqq.com/sub?sendkey={$key}&text={$title}&desp={$desp}");

// 新
file_get_contents("https://sctapi.ftqq.com/{$sendkey}.send?" . http_build_query([
    'title' => $title,
    'desp'  => $desp,
]));
```

```javascript
// 旧
await fetch(`https://pushbear.ftqq.com/sub?sendkey=${KEY}&text=${encodeURIComponent(title)}`);

// 新
await fetch(`https://sctapi.ftqq.com/${SENDKEY}.send`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({ title, desp })
});
```

## 顺手可以改进的地方

既然要动这段代码，有几件事值得一并做掉：

- **把 SendKey 移到环境变量**。老代码里 sendkey 常常硬编码在脚本里，甚至提交进了 git。换 key 是清理它的好时机。
- **把推送封装成一个函数**。以后再换服务就只改一个地方。
- **用上 Markdown**。PushBear 时代正文是纯文本，Server酱 的 `desp` 支持 Markdown——告警里放表格、代码块、跳转链接，排查时省事很多。
- **注意标题长度**。`title` 超过 32 个字符会被截断，长内容放正文里。

## 迁移之后

Server酱 除微信外还支持企业微信应用消息、企微/钉钉/飞书群机器人和 App 通道，同一个 SendKey 可以切换落点，见 [通道对比](https://sct.ftqq.com/docs/getting-started/channels/)。

如果当初用 PushBear 是为了给现成软件加通知，现在多数软件已经内置了 Server酱 通知类型，不用自己拼 URL——见 [140+ 篇接入教程](https://sct.ftqq.com/docs/)。

## 常见问题

### 老的 PushBear sendkey 还能用吗？

不能。PushBear 和 Server酱 是两套独立的账号体系，需要重新扫码登录获取新的 SendKey（以 `SCT` 开头）。

### 旧版 sc.ftqq.com 的用户也要迁移吗？

sc.ftqq.com 是 Server酱 的旧版，新版 sct.ftqq.com 完全兼容它的 API：把域名换成 `sctapi.ftqq.com`，换用新 SendKey 即可，参数不用动。

### 迁移后免费额度是多少？

免费会员每天 5 条，注册即得，新用户另有 7 天全功能试用；订阅会员每天 1000 次 API 调用、每分钟不超过 50 条。

### 请求成功但收不到消息？

先看返回 JSON 的 `code` 是不是 0，非 0 时 `message` 会说明原因；再确认当天额度没用完、微信端没有取消关注服务号。完整排查顺序见 [常见问题](https://sct.ftqq.com/docs/getting-started/faq/)。

### 有没有可以自建的替代品？

有。[WeCom酱（wecomchan）](https://github.com/easychen/wecomchan) 走企业微信通道、可自建；PushDeer 是跨平台的开源自建方案。几种方案的取舍见 [推送服务对比](https://sct.ftqq.com/compare/)。

## 下一步

- [30 秒获取 SendKey](https://sct.ftqq.com/docs/getting-started/sendkey/)
- [微信推送 API 怎么做](https://sct.ftqq.com/wechat-push/)
- [Server酱 与其他推送服务对比](https://sct.ftqq.com/compare/)
- [常见问题与排查](https://sct.ftqq.com/docs/getting-started/faq/)
