Skip to main content

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​

TypeEndpointNotes
Text postPOST /api/upload_textUp to 500 characters (the default instance limit)
PhotosPOST /api/upload_photosUp to 4 photos per post
VideoPOST /api/upload1 video per post, max 40 MB

Limits​

LimitValue
Post length500 characters
Photos per post4
Videos per post1 (photos and a video can't be mixed)
Max file size40 MB
Posting rateDefault instance limit: 300 posts per 3 hours

Some instances set different limits; the values above are Mastodon's defaults.

Get an Access Token​

  1. Sign in to your Mastodon instance in a browser (e.g. https://mastodon.social).
  2. Open Preferences → Development → New application.
  3. Enter an application name (e.g. IndReelForge).
  4. Under Scopes, make sure write:statuses and write:media are ticked. You can untick the others.
  5. Click Submit, open the application you just created and copy Your access token.

Connect Mastodon​

From the dashboard​

  1. Dashboard → Profiles → select your profile
  2. Click Connect next to Mastodon
  3. Enter the Instance URL (e.g. https://mastodon.social) and the Access token
  4. 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"}'
FieldRequiredDescription
instance_urlYesThe address of your Mastodon server
access_tokenYesAccess 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​

ProblemCauseFix
Connect fails with INVALID_CREDENTIALSWrong instance URL or token, or the token was revokedCheck the instance address and copy the token again
Media upload rejectedThe token lacks write:mediaEdit the application, tick write:media, and reconnect with the token
Post rejected as too longOver the instance's character limit (500 by default)Shorten the text or use mastodon_title
More than 4 photosMastodon allows 4 attachments per postSend up to 4 photos
Rate limitedInstance limit reached (300 posts / 3 hours by default)Space posts out or schedule them