没有不值得去解决的问题,也没有不值得去学习的技术!

Weibo Media Platform API: Troubleshooting Article Response Code 10008, “param content invalid”

Weibo Self-Media Access Platform – Toutiao Article Open API response, code: 10008, message: param content invalid.

1. Weibo Self-Media Access Platform – Toutiao Article Open API response, code: 10008, message: param content invalid. See Figure 1.

Weibo Self-Media Access Platform – Toutiao Article Open API response, code: 10008, message: param content invalid.
Figure 1

2. I decided to analyze the content data. After saving the content into a Notepad file, its size was 175 KB. The content is as follows. See Figure 2.

I decided to analyze the content data. After saving the content into a Notepad file, its size was 175 KB. The content is as follows.
Figure 2

3. Checking the documentation, content must be within 90,000 Chinese or English characters and requires URL encoding. See Figure 3.

Checking the documentation, content must be within 90,000 Chinese or English characters and requires URL encoding.
Figure 3

4. Using an online word counter, the total character count is 177,976. This exceeds the 90,000 limit. See Figure 4.

Using an online word counter, the total character count is 177,976. This exceeds the 90,000 limit.
Figure 4

5. After editing the article content, I published it again, reducing the total character count to 101,461. The publication succeeded. I suspect that Weibo’s character counting rules differ from those of the online tool. Regardless, the cause has been identified: the publication failed because the content exceeded the character limit, resulting in the response: code: 10008, message: param content invalid. I plan to verify the character count later, provided that the counting rules are consistent. See Figure 5.

After editing the article content, I published it again, reducing the total character count to 101,461. The publication succeeded. I suspect that Weibo's character counting rules differ from those of the online tool. Regardless, the cause has been identified: the publication failed because the content exceeded the character limit, resulting in the response: code: 10008, message: param content invalid. I plan to verify the character count later, provided that the counting rules are consistent.
Figure 5

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系