Mastodon
Post to any Mastodon instance directly from FaustBot. Share stream updates, clips, and interact with the fediverse community using the full Mastodon API.
Overview
FaustBot connects to any Mastodon-compatible server using OAuth, providing full social functionality:
Post Statuses
Create toots up to 500 characters.
Media Uploads
Attach up to 4 images/videos per post.
Visibility Control
Public, unlisted, followers-only, or direct.
Content Warnings
Add spoiler text to sensitive posts.
Boost & Favourite
Interact with other users' content.
Streaming
Real-time timeline and notification feeds.
Instance Compatibility
This integration works with Mastodon, Pleroma, Akkoma, Misskey, and other Mastodon API-compatible servers.
Setup
Connect to Mastodon
Enter Instance URL
In FaustBot, go to Mastodon in the sidebar. Enter your instance
URL (e.g., mastodon.social, fosstodon.org, etc.).
Authorize FaustBot
Click Connect to open the authorization page in your browser. Log in to your Mastodon account and authorize FaustBot access.
Verify Connection
Once authorized, your profile information will appear in FaustBot. You can now post to Mastodon and interact with the fediverse.
Multiple Accounts
You can connect multiple Mastodon accounts from different instances. Each account can be used independently in your actions and scripts.
Effects
Posting
Post Status
Create a toot with visibility options.
Post with Media
Attach images or videos to a post.
Reply to Status
Reply to an existing toot.
Delete Status
Remove a toot by ID.
Interactions
Boost
Reblog a status to your followers.
Favourite
Like a status.
Scripting API
Post to Mastodon programmatically from your scripts:
Connection & Info
# Check connection
if CPH.MastodonIsConnected():
info = CPH.MastodonGetConnectionInfo()
username = CPH.MastodonGetUsername()
instance = CPH.MastodonGetInstanceUrl()
account_id = CPH.MastodonGetAccountId()
CPH.Log(f"Connected as @{username}@{instance}")Creating Posts
# Simple text post (max 500 characters)
# Visibility: "public", "unlisted", "private", "direct"
CPH.MastodonPostStatus("Going live now!", "public")
# Post with spoiler/content warning
CPH.MastodonPostStatusWithSpoiler(
"Spoilers for the game ending!",
"Game Spoilers",
"public"
)
# Reply to a status
CPH.MastodonReplyToStatus(
status_id,
"Thanks for watching!",
"public"
)
# Post with media attachments
# First upload media, get IDs, then post
media_ids = ["media-id-1", "media-id-2"]
CPH.MastodonPostStatusWithMedia(
"Check out these screenshots!",
media_ids,
sensitive=False,
"public"
)
# Delete a status
CPH.MastodonDeleteStatus(status_id)Interactions
# Boost (reblog) a status
CPH.MastodonReblogStatus(status_id)
# Unboost a status
CPH.MastodonUnreblogStatus(status_id)
# Favourite a status
CPH.MastodonFavouriteStatus(status_id)
# Unfavourite a status
CPH.MastodonUnfavouriteStatus(status_id)
# Bookmark a status
CPH.MastodonBookmarkStatus(status_id)
# Remove bookmark
CPH.MastodonUnbookmarkStatus(status_id)User Management
# Follow an account
CPH.MastodonFollowAccount(account_id)
# Unfollow an account
CPH.MastodonUnfollowAccount(account_id)
# Block an account
CPH.MastodonBlockAccount(account_id)
# Unblock an account
CPH.MastodonUnblockAccount(account_id)
# Mute an account (duration in seconds, 0 = indefinite)
CPH.MastodonMuteAccount(account_id, duration=0)
# Unmute an account
CPH.MastodonUnmuteAccount(account_id)Media & Timelines
# Upload media file
CPH.MastodonUploadMedia("/path/to/image.png", "Alt text description")
# Get home timeline
CPH.MastodonGetHomeTimeline(limit=20)
# Get public timeline
CPH.MastodonGetPublicTimeline(local=True, limit=20)
# Get hashtag timeline
CPH.MastodonGetHashtagTimeline("streaming", local=False, limit=20)
# Get notifications
CPH.MastodonGetNotifications(limit=50)
# Clear all notifications
CPH.MastodonClearNotifications()
# Streaming (real-time updates)
CPH.MastodonConnectStreaming("user") # "user", "public", "hashtag"
CPH.MastodonDisconnectStreaming()
if CPH.MastodonIsStreamingConnected():
CPH.Log("Streaming active")Visibility Reference
public
Visible to everyone, shown on public timelines.
unlisted
Visible to everyone, but not on public timelines.
private
Visible only to your followers.
direct
Visible only to mentioned users (DM).
See the full API reference for all available Mastodon methods.