Folo icon indicating copy to clipboard operation
Folo copied to clipboard

n8n 通过 HTTP 请求推送到 [api.follow.is](http://api.follow.is) 返回 400(Body 未被接收为 JSON)

Open lincomao opened this issue 1 year ago • 2 comments

Clear and concise description of the problem

你好,Folo 团队:

我在按照文档用 HTTP 请求向收件箱推送内容时,服务器持续返回 400。请帮忙排查。

环境与目标

  • 目标:向 Folo 收件箱推送一条测试内容
  • 接口:POST https://api.follow.is/
  • [句柄(X-Follow-Handle):[email protected]](mailto:句柄(X-Follow-Handle):[email protected])
  • 密钥(X-Follow-Secret):FkqSR66lKq_l1eGymDkO6
  • 客户端:n8n v1.107.3 自托管

实际错误

  • 接口返回(n8n 报错摘要):
    • errorMessage: "Bad request - please check your parameters"
    • errorDescription: "400 - "{}""
    • httpCode: "400"
  • 另一处验证时,若 Body 为空或 JSON 不合法,n8n 会提示:
    • "JSON parameter needs to be valid JSON"

我发送的请求(两种复现场景)

  1. 终端 cURL(Windows 用双引号已转义,Mac/Linux 可用单引号版本)

curl -X POST "https://api.follow.is/" ^

-H "Content-Type: application/json" ^

-H "X-Follow-Handle: [[email protected]](mailto:[email protected])" ^

-H "X-Follow-Secret: FkqSR66lKq_l1eGymDkO6" ^

-d "{"guid":"demo-2025-10-25-063700Z","publishedAt":"2025-10-25T06:37:00Z","title":"最小验证","url":"https://example.com/","content":"hello","language":"zh-CN","categories":["测试"]}"

  1. n8n HTTP Request 节点配置
  • Method: POST
  • URL: https://api.follow.is/
  • Headers:
  • Send Body: 开启
  • Body Content Type: JSON
  • Raw JSON 一行:

{"guid":"demo-2025-10-25-063800Z","publishedAt":"2025-10-25T06:38:00Z","title":"最小验证","url":"[https://example.com/","content":"hello","language":"zh-CN","categories":"测试"]}

现象

  • 服务器响应 400,且描述为 "{}"。怀疑服务端未正确接收到 JSON Body,或我使用的 Header/句柄/密钥或字段要求与最新规范不一致。

想请教的问题

  1. 以上 endpoint 与 Header(X-Follow-Handle / X-Follow-Secret)的用法是否正确?是否有最新或更推荐的域名/路径?

  2. 对于 WebhookPayload,是否存在必填字段或字段格式(例如 publishedAt 的时区/格式、categories 的类型)导致 400?

  3. 如果请求体为空或服务端判断为无效,是否会统一返回 "{}"?是否能在响应体中返回更具体的错误信息便于定位?

  4. 是否有请求大小/字符集/转义方面的限制(例如 content 中 HTML/换行需要特殊处理)?

  5. 是否有可供开发者自测的回显接口/示例或 Postman collection?

如需协助定位,我可以提供完整的 Raw HTTP 报文、时间戳与请求 ID。感谢支持!

此致

长茂 林

[邮箱:[email protected]](mailto:邮箱:[email protected])

时间:2025-10-25 14:36 (Asia/Shanghai)

Suggested solution

希望你们及时解决我的问题

Alternative

No response

Additional context

No response

Validations

  • [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [x] This issue is valid

lincomao avatar Oct 25 '25 07:10 lincomao

FOL-2679

linear[bot] avatar Oct 25 '25 07:10 linear[bot]

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


FOL-2679

github-actions[bot] avatar Oct 25 '25 07:10 github-actions[bot]