Import your toots from Mastodon and GoToSocial instances into your blog.
Find a file
2026-02-23 16:02:59 +01:00
.gitattributes Add .gitattributes 2026-01-01 15:59:00 +01:00
extension.ini Update extension.ini 2026-02-23 08:41:03 +01:00
help-gotoso-de.md Update help-gotoso-de.md 2025-08-21 12:16:34 +02:00
help-gotoso-en.md Update help-gotoso-en.md 2025-08-21 12:17:01 +02:00
LICENSE LICENSE aktualisiert 2025-08-14 09:49:20 +02:00
mastodonapi.php Update mastodonapi.php 2026-02-23 08:40:40 +01:00
mastodonapi.status Update mastodonapi.status 2026-01-08 08:52:12 +01:00
readme-de.md Update readme-de.md 2026-02-23 16:02:59 +01:00
readme.md Update readme.md 2026-02-23 16:02:33 +01:00

Deutsch   English

Mastodonapi 0.9.6

Import your toots from Mastodon and GoToSocial instances into your blog.

Installation

Download ZIP file and copy it into your system/extensions folder. Learn more about extensions.

How to

The plugin works fully automatically. It regularly checks in the background if there are new posts.

When you visit the site, it queries your Mastodon API and automatically creates blog posts from your Toots. Optionally, you can specify a #Hashtag to import only certain posts.

There are three ways to trigger the import:

  1. Automatic (Lazy Cron): As soon as a visitor accesses your website, the plugin checks if the update interval has expired and loads new Toots if necessary.
  2. From the terminal: You can manually start the import on the server with: php yellow.php mastodonapi
  3. From the system cronjob: If your host supports cronjobs, you can have the command php yellow.php mastodonapi run regularly (e.g. every 30 minutes).

Settings

All settings are in system/extensions/yellow-system.ini:

MastodonapiInstanceUrl = your Mastodon instance URL (e.g. https://mastodon.social)
MastodonapiAccountId = your Mastodon user ID (numeric, e.g. 1234567890)

Find the ID of a Mastodon account: Enter "https://YOUR_INSTANCE_URL/api/v1/accounts/lookup?acct=PROFILNAME" in your browser.
Find the ID of a GoToSocial account (see here)

MastodonapiAccessToken = optional for a Mastodon account, mandatory for a GoToSocial account (see here)
MastodonapiUpdateInterval = time interval between automatic updates in minutes (default: 30)
MastodonapiLimit = number of Toots retrieved per run (default: 20)
MastodonapiHashtag = leave blank for all posts; or filter with #hashtag
MastodonapiAuthor = name under which the blog posts should appear
MastodonapiTag = tag for the blog posts (default: Fediverse)
MastodonapiFolder = path to the blog folder (default: content/2-blog/)
MastodonapiMaxAge = age of Toots in hours that should still be imported. 0 = all available Toots
MastodonapiStatus = page status, default value is public

The following status values are supported:

public = page is a normal page
draft = page is not visible, user needs to log in, requires draft extension
unlisted = page is not visible, but can be accessed with the correct link

Developer

Simon Rohr