This documents the WeRSS API endpoints that werss-cli actually calls. For the full API schema, see the openapi.json file in the repository.
Form-encoded login. Returns a Bearer token.
Request:
POST /api/v1/wx/auth/login
Content-Type: application/x-www-form-urlencoded
username=admin&password=secret
Response:
{
"code": 0,
"message": "success",
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600,
"refresh_token": "optional-refresh-token"
}
}Fields:
access_token(required): Bearer token for subsequent API requestsexpires_in(optional): Token lifetime in secondsrefresh_token(optional): Refresh token for token renewal (may not be present in all API implementations)
All subsequent requests use Authorization: Bearer <access_token>. werss-cli automatically:
- Validates token expiry before each use (5-minute buffer)
- Attempts token refresh on 401 responses (if
refresh_tokenis provided) - Falls back to re-authentication with stored credentials if refresh fails
List all public accounts. Auto-paginated by werss-cli.
Response:
{
"code": 0,
"data": {
"list": [
{ "id": "MP_WXS_3079106503", "mp_name": "逻辑仓管AI运营社" }
],
"total": 5
}
}Trigger article sync from WeChat for a specific MP. werss-cli retries this up to 3 times with 5-second delays.
List articles for a specific MP. Auto-paginated by werss-cli.
Response:
{
"code": 0,
"data": {
"list": [
{
"id": "3079106503-2451582093_1",
"title": "Article Title",
"publish_time": 1773847920
}
],
"total": 42
}
}Trigger content refresh for an article. Returns a task_id for polling.
Response:
{
"code": 0,
"data": {
"task_id": "abc123"
}
}Poll the refresh task status. werss-cli polls every 3 seconds with a 180-second timeout.
Response:
{
"data": {
"status": "success"
}
}Status values: "pending", "processing", "success", "failed".
Get full article detail including HTML content.
Response:
{
"code": 0,
"message": "success",
"data": {
"id": "3079106503-2451582093_1",
"mp_id": "MP_WXS_3079106503",
"title": "对本地养虾不死心,Nanoclaw 实测 Qwen3.5-9B-Claude-4.6-Opus 量化版",
"pic_url": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/.../0?wx_fmt=jpeg",
"url": "https://mp.weixin.qq.com/s/TJxmO6uKrtcZ52aczSogow",
"description": "各大平台 coding plan 纷纷涨价...",
"content": "<p>Clean body HTML...</p>",
"content_html": "<p>Full HTML with cover + h1 + author...</p>",
"publish_time": 1773847920,
"status": 1,
"created_at": "2026-03-19T15:33:25.120210",
"updated_at": 1775401843
}
}| Field | Description |
|---|---|
content |
Clean body HTML (preferred source for conversion) |
content_html |
Full HTML including cover image, h1 title, and author line |
pic_url |
Cover image URL (used for workspace publishing) |
publish_time |
Unix timestamp |
werss-cli requires a running WeRSS API server. The server handles WeChat scraping and provides the REST API that werss-cli consumes.