I'm working on a project that involves automatically posting to Medium. However, I believe there's no official API available for this platform. I've been trying to use go-rod stealth to bypass Medium's Web Application Firewall (WAF), but it keeps flagging and blocking me like a bot. I'm curious to hear any thoughts or suggestions on how to approach this problem. Additionally, is there a way for me to reverse-engineer Medium's API, considering I don't have much experience in reverse engineering?
3 Answers
Normally I’d be pretty snarky, but considering it’s Medium we’re talking about, I can understand the struggle!
You know, if you're trying to automate posting on Medium, you should be aware that you're pretty much behaving like a bot, which is why it flags you. If there's no official API, getting around the WAF won't be easy and they clearly don’t want this kind of automation. Instead of struggling with this, have you thought about just creating your own blog? You could use an existing platform or even code something from scratch.
Medium's WAF is definitely on the aggressive side. They keep updating their detection methods, so any workaround you find might stop working at any time. Have you checked out puppeteer with some stealth plugins? While it’s not a perfect solution, sometimes it’s easier to mimic real browser behavior than to constantly fight against the WAF.

I actually got it working! I had to disable a lot of the browser flags and tweak some settings here and there. Let's see how long it holds up before it breaks again.