Skip to Content
MediaTofu

Authentication

Send your API key with every request.

Every /v1/ request needs an API key. Use either header:

# Option 1
-H "Authorization: Bearer $MEDIATOFU_API_KEY"

# Option 2
-H "X-API-Key: $MEDIATOFU_API_KEY"

If both are sent, X-API-Key wins.

Keys

Create and revoke keys in the dashboard at app.mediatofu.com, under API keys. A key looks like mt_ followed by 48 hexadecimal characters.

  • An account can have up to 20 active keys.
  • A key is shown once, when you create it. We store only its SHA-256 hash, so a lost key can't be recovered. Create a new one and revoke the old one.
  • A revoked key stops working at once.

Keep keys on your server. Anyone with your key can run jobs on your account.

Each webhook is signed using the key that started the job.

Authentication errors

StatusErrorMeaning
401Missing or invalid API key.The key is missing, wrong or revoked.
402Your subscription isn't active.Your paid subscription has ended or isn't active.
403This account is suspended and can't run jobs.The account is suspended. Reading existing jobs still works.

All error responses use the same format.

On this page