Mastodon icon

Mastodon

Interact with Mastodon API

Overview

This node interacts with the Mastodon API, specifically supporting various resources and operations including authentication. For the 'Authentication' resource and 'Obtain Token' operation, it facilitates obtaining an OAuth token by exchanging an authorization code with the Mastodon instance. This is useful in scenarios where a user needs to authenticate and authorize an application to access their Mastodon account securely. Practical examples include automating Mastodon account management or integrating Mastodon features into other applications.

Use Case Examples

  1. Obtaining an OAuth token after a user authorizes the app on a Mastodon instance.
  2. Automating the login process to Mastodon for further API interactions.

Properties

Name Meaning
Mastodon URL URL of the Mastodon instance to connect to, e.g., https://mastodon.social.
Client ID OAuth client ID used for authentication.
Client Secret OAuth client secret used for authentication.
Authorization Code Code received from OAuth authorization to exchange for an access token.
Redirect URI Redirect URI matching the app registration, used in OAuth flow.

Output

JSON

  • access_token - The OAuth access token obtained from Mastodon.
  • token_type - Type of the token, typically 'Bearer'.
  • scope - Scopes granted by the token.
  • created_at - Timestamp when the token was created.

Dependencies

  • Requires OAuth credentials: Client ID and Client Secret for Mastodon OAuth2 authentication.

Troubleshooting

  • Ensure the Mastodon URL is correct and accessible.
  • Verify that the Client ID and Client Secret match those registered on the Mastodon instance.
  • Make sure the Authorization Code is valid and not expired.
  • Redirect URI must exactly match the one registered in the Mastodon app settings.
  • Common errors include invalid_client, invalid_grant, or redirect_uri_mismatch, which indicate issues with OAuth credentials or parameters.

Links

Discussion