Publishing to Juejin Through Its Web API: The mark_content Lesson
Automating content publishing is a common task for developer-advocates and technical writers. Juejin (掘金) is a popular Chinese developer community, and like many modern web apps, it relies on an internal HTTP API for its editor. That API is undocumented and changes without notice. This post is a post-mortem of a silent regression: drafts saved with empty bodies and a publish call returning…
Juejin, a popular Chinese developer community, utilizes an internal HTTP API for its editor. This API is undocumented and changes without notice. A developer encountered a regression where drafts were saved with empty bodies and a publish call returning err_no=1010. The issue was traced to a required field named mark_content. By capturing the real client's actions through DevTools and generating cURL requests, the issue was identified.
The save draft call required mark_content to be present and non-empty. The publish call returned an error if mark_content was missing or empty. This information was then used to create Python functions for saving and publishing drafts using the requests library.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.