DEV Community

John Builds
John Builds

Posted on

Auto-DM new Twitter/X followers: how we built it, and the API wall blocking Instagram and LinkedIn

I shipped Auto DM replies in XreplyAI this week. Here's how it works under the hood, and why bringing it to Instagram and LinkedIn is a much harder problem.

The X implementation

The core loop is straightforward: poll for new followers, diff against a snapshot, send DMs to net-new ones. The details that matter:

  • First run snapshots up to 1,000 existing followers so you don't blast your whole audience on day one
  • Each subsequent cycle polls the 100 most recent followers and compares against the snapshot
  • Rate-limited to 15 DMs per cycle — Twitter's DM rate limits are easy to hit if you're not careful
  • Template supports a {name} placeholder; everything else is plain text (500 char limit)
  • All sends logged with status: pending / sent / failed

The tricky edge: if a user has 50,000 followers, the snapshot only captures 1,000. Anyone outside that window who was already following before first run could theoretically get a DM. We flag this in the UI and let the user decide.

Why Instagram and LinkedIn are a different problem

Instagram DMs require instagram_manage_messages — a permission that goes through manual Meta app review. The review checks your automation use case against their policy. Outcome isn't guaranteed, timeline is weeks, and the reviewer feedback loop is slow.

LinkedIn is the real wall. Automated DMs to followers or post engagers requires the Community Management API. It's invite-only, no public application, and requires a LinkedIn partnership contact to even get into the queue. I've been trying to find the right entry point for weeks.

If you've navigated either of these — especially LinkedIn's partnership process — I'd genuinely love to compare notes in the comments.

X Auto DM is live now on Pro and BYOK plans: https://xreplyai.com?utm_source=devto&utm_medium=social&utm_campaign=feature-2026-05-08

Top comments (0)