Mastodon Upload Guide
Post text, photos and videos to Mastodon — on any instance — using the IndReelForge API. Mastodon connects with your instance URL and an access token from an application you create on that instance.
Supported Content Types
| Type | Endpoint | Notes |
|---|---|---|
| Text post | POST /api/upload_text | Up to 500 characters (the default instance limit) |
| Photos | POST /api/upload_photos | Up to 4 photos per post |
| Video | POST /api/upload | 1 video per post, max 40 MB |
Limits
| Limit | Value |
|---|---|
| Post length | 500 characters |
| Photos per post | 4 |
| Videos per post | 1 (photos and a video can't be mixed) |
| Max file size | 40 MB |
| Posting rate | Default instance limit: 300 posts per 3 hours |
Some instances set different limits; the values above are Mastodon's defaults.
Get an Access Token
- Sign in to your Mastodon instance in a browser (e.g.
https://mastodon.social). - Open Preferences → Development → New application.
- Enter an application name (e.g.
IndReelForge). - Under Scopes, make sure
write:statusesandwrite:mediaare ticked. You can untick the others. - Click Submit, open the application you just created and copy Your access token.
Connect Mastodon
From the dashboard
- Dashboard → Profiles → select your profile
- Click Connect next to Mastodon
- Enter the Instance URL (e.g.
https://mastodon.social) and the Access token - IndReelForge verifies the token with your instance before saving — status shows Connected
With the API
curl -X POST https://api.indreelforge.com/api/profiles/my-brand/connect/mastodon/credentials \
-H 'Authorization: Apikey YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"instance_url": "https://mastodon.social", "access_token": "YOUR_MASTODON_TOKEN"}'
| Field | Required | Description |
|---|---|---|
instance_url | Yes | The address of your Mastodon server |
access_token | Yes | Access token with write:statuses and write:media |
See Connect with Credentials for the full request and response format.
Post a Text Update
curl -X POST https://api.indreelforge.com/api/upload_text \
-H 'Authorization: Apikey YOUR_KEY' \
-F 'user=my-brand' \
-F 'title=Hello fediverse! We are now posting here too. #introduction' \
-F 'platform[]=mastodon'
Post Photos
curl -X POST https://api.indreelforge.com/api/upload_photos \
-H 'Authorization: Apikey YOUR_KEY' \
-F 'user=my-brand' \
-F 'title=Sunset from the office roof' \
-F 'photos[]=@/path/to/photo1.jpg' \
-F 'photos[]=@/path/to/photo2.jpg' \
-F 'platform[]=mastodon'
Post a Video
curl -X POST https://api.indreelforge.com/api/upload \
-H 'Authorization: Apikey YOUR_KEY' \
-F 'user=my-brand' \
-F 'title=60-second product tour' \
-F 'video=@/path/to/video.mp4' \
-F 'platform[]=mastodon'
Post Across Mastodon + Bluesky + Threads
curl -X POST https://api.indreelforge.com/api/upload_text \
-H 'Authorization: Apikey YOUR_KEY' \
-F 'user=my-brand' \
-F 'title=Our new release is out — what should we build next?' \
-F 'platform[]=mastodon' \
-F 'platform[]=bluesky' \
-F 'platform[]=threads'
Use mastodon_title to send Mastodon different text than the other platforms in the same request.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
Connect fails with INVALID_CREDENTIALS | Wrong instance URL or token, or the token was revoked | Check the instance address and copy the token again |
| Media upload rejected | The token lacks write:media | Edit the application, tick write:media, and reconnect with the token |
| Post rejected as too long | Over the instance's character limit (500 by default) | Shorten the text or use mastodon_title |
| More than 4 photos | Mastodon allows 4 attachments per post | Send up to 4 photos |
| Rate limited | Instance limit reached (300 posts / 3 hours by default) | Space posts out or schedule them |