Mastodon icon

Mastodon

Interact with Mastodon API

Overview

This node interacts with the Mastodon API to update media information on a Mastodon instance. It is useful for scenarios where users want to modify metadata of media files they have uploaded, such as adding or updating descriptions for accessibility or adjusting the focus point of an image. For example, a user can update the description of an image to improve accessibility or set the focus coordinates to highlight a specific part of the media.

Use Case Examples

  1. Updating the description of an uploaded image to provide better context for screen readers.
  2. Adjusting the focus point of a photo to ensure the most important part is centered when displayed.

Properties

Name Meaning
Mastodon URL The URL of the Mastodon instance to connect to for the API request.
Media ID The unique identifier of the media item to update on the Mastodon instance.
Update Fields A collection of fields to update on the media, including description and focus coordinates.

Output

JSON

  • id - The unique identifier of the updated media.
  • type - The type of media (e.g., image, video).
  • description - The updated text description of the media.
  • focus - The updated focus coordinates of the media.
  • url - The URL where the media is accessible.

Dependencies

  • Requires an OAuth2 API credential for Mastodon authentication to authorize requests to the Mastodon instance.

Troubleshooting

  • Common issues include providing an incorrect Mastodon instance URL or invalid media ID, which will result in errors from the Mastodon API indicating resource not found or unauthorized access.
  • Errors may also occur if the OAuth2 credentials are missing or invalid, causing authentication failures.
  • If the update fields are incorrectly formatted (e.g., focus coordinates not in the correct range or format), the API may reject the request.

Links

  • Mastodon API Media Documentation - Official documentation for media-related endpoints in the Mastodon API, useful for understanding the update media operation.

Discussion