TNS
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
NEW! Try Stackie AI
API Management / Emerging technologies / Frontend Development

Developers: Mastodon and Bluesky Want Your Twitter Bots

Mastodon and Bluesky have emerged as viable social platforms for third-party development post-Twitter, but there are still risks for devs.
Nov 18th, 2024 12:00pm by
Featued image for: Developers: Mastodon and Bluesky Want Your Twitter Bots
Image via Unsplash+. 

In early October 2022, I published one of the worst-timed articles of my career: Developers: Twitter Wants Your Bots. It was an interview with Amir Shevat, then head of the developer platform at Twitter, and it was about how third-party developers were being welcomed back to Twitter’s platform.

About three weeks later, Elon Musk acquired Twitter. Shortly after that, Shevat was fired, along with all of his team. Needless to say, X (the company formerly known as Twitter) no longer wants your bots. But there is good news. Mastodon and Bluesky, the primary alternatives to X from a third-party developer perspective, would welcome your bots — and any other apps, for that matter.

See also: The State of the Open Web Heading Into 2025

By bots, I mean automated accounts that use the platform’s API to publish, typically on a schedule defined by the developer. They’re a good way to get to know the API and app development capabilities of a social media platform.

Running Bots on Mastodon and Bluesky

To host a bot on Mastodon, you can either use a server that specializes in bots — although the only one I found currently open for registrations is mastodon.bots — or you can just use one of the general-purpose instances. One of the bots I follow, never obsolete, runs on mastodon.social, the primary Mastodon server. (More on specialized bot servers in a minute!)

never obsolete bot

never obsolete bot on Mastodon.

Many Mastodon developers use Glitch, a free online web app builder, to run their bots. For example, Stefan Bohacek, a bot developer who also runs the resource site Botwiki, has a collection of 54 active Mastodon bots running on Glitch. However, there are alternative ways to create a bot, such as via a Python app or using GitHub Actions.

As for dealing with the Mastodon API, it’s easy, says Bohacek.

“Specifically with Mastodon, creating a bot account is super easy,” he wrote in response to my query on Mastodon. “Just like setting up a regular account, you don’t need to verify your phone number, which has been a requirement on Twitter. The Mastodon API is also very easy to use and pretty well documented, at least for my own needs. And I like that you can mark your account as “automated” on its profile page.”

If you’re interested in creating a Mastodon bot, you can find more resources on Botwiki.

So what about Bluesky? You can create a bot there using the AT Protocol SDK. Bluesky even helpfully gives you a code template for creating bots (it’s in TypeScript), and it recommends Heroku or Fly.io to deploy it.

As of the time of writing, there are 21 bots listed in Bluesky’s community showcase. But one I enjoy that isn’t listed is Retro Computers, which was actually inspired by never obsolete on Mastodon. Retro Computers uses a Python script to generate its “semi-automated” posts.

Retro Computers bot

Retro Computers bot on Bluesky.

Mastodon: Stable Bot Platform, but With Risks

Since Mastodon has been around longer than Bluesky, it has built up a solid ecosystem around bots. Some bot developers have been active on Mastodon since 2017. One of those is Darius Kazemi, who I interviewed back in May 2022. Kazemi had previously been a prolific creator of bots on Twitter but switched to the fediverse in 2017 after a crackdown on bots by Twitter. “And then they also changed all their APIs,” Kazemi explained, “which are the programmatic interface for how a bot talks to Twitter. So they changed those without really any warning, and everything broke.”

So even well before Elon Musk arrived, Twitter had messed up on bot development. Like Bohacek, Kazemi now hosts his Mastodon bots on Glitch.

Although bot development on Mastodon has been happening for years now, there are risks associated with the server you choose. Until very recently, the leading Mastodon server that specialized in bots was botsin.space. But it just announced it will be closing in December.

Botsin.space

Botsin.space, a specialized Mastodon instance that just announced its closure.

The developer behind botsin.space, Colin Mitchell, outlined his reasons for closing it in a blog post. After explaining that he’s a tech professional (“server management is part of my job description”), he noted that his server expenses have been gradually increasing. It reached a kind of crisis point after the recent Mastodon upgrade — Mastodon 4.3 was released in October — which he said “caused a significant amount of performance degradation” for his service. Rather than “throw a lot of money into hardware,” he’s instead opted to gracefully shutter botsin.space.

None of this is an indictment of the Mastodon software, but it is a cold hard reality than many people who run Mastodon instances do so at a loss — so these servers are more at risk of shutting down than platforms like Threads (owned by Meta) or a VC-funded company like Bluesky.

Bluesky’s Developer Risks

But the risks at Bluesky are just as stark, if not more so. As I noted in my previous post, Bluesky is not very decentralized at the present time — roughly 99% of its infrastructure is under the direct control of Bluesky, the company. What if Bluesky gets sold (as happened with Twitter)? Or what if it decides to change the rules for developers (as also happened with Twitter)?

Since I published that article, a more in-depth critique of Bluesky has emerged. Gavin Anderegg, a freelance software developer, explained that a key part of Bluesky’s infrastructure — a Relay, which crawls data and outputs it into “one big stream” — is extremely expensive for third-party developers to run. In other words, devs will likely have to use Bluesky’s Relay for the short-to-medium term. He also pointed out that the DID:PLC (a cryptographic public ledger of credentials, used to manage identity) and DMs are also “directly under Bluesky’s control.” The money quote from Anderegg was this:

“Bluesky is slightly more decentralized than, say, Facebook — but not by much. Yes, you can host your own data. Yes, you can scrape all of the content on the network. But you can’t do anything with it unless you’re attached to the Bluesky service. I believe this will change with time, but it will be prohibitively expensive and we’re not there yet.”

Conclusion

I think both Mastodon and Bluesky are worth experimenting with as platforms for third-party development, although obviously, bear in mind the above risks. But since bots are relatively low-risk as an application type (it’s not as if you’re building a large app like TweetDeck), it’s a good way to kick the tires on a new social platform.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Fly.io.
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.