OAuth2 fails for Mastodoncommunity node

Describe the problem/error/question

I use the n8n community node to connect to Mastodon. But the OAuth2 connection fails.

What is the error message (if any)?

I get the error “The requested scope is invalid, unknown, or malformed.”
But the scope I gave Mastgodon is just “write”.

But this is the scope I checked in the Mastodon backend:

I also tried with just “read” (after checking this in the Mastodon backend) and “write:statuses” (which would be enough) - both fail with the same error message.

Information on your n8n setup

  • n8n version: 1.101.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu 24.04.2 LTS

The error usually happens because Mastodon expects specific scope names, and they must match exactly what the instance allows. Common valid scopes are:

  • read

  • write

  • follow

  • write:statuses

If you’re getting “invalid scope,” it often means:

  1. The scope string is case-sensitive or formatted incorrectly (no extra spaces or commas).

  2. The Mastodon instance you’re connecting to does not support that scope for third-party apps.

  3. Some community nodes in n8n expect comma-separated multiple scopes, while Mastodon expects space-separated scopes in OAuth2.

:white_check_mark: Fix:

  • Use the exact scope string shown in Mastodon when registering the app.

  • For posting statuses, try write:statuses exactly as shown.

  • Make sure multiple scopes are space-separated, e.g., read write:statuses.

Can you try without the scopes and also try changing Authorization to Body, again with and without scopes? Make sure to list all scopes the app has, separated by space.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.