Mastodon icon

Mastodon

Interact with Mastodon API

Actions115

Push → Subscribe to Push Notifications

AI-generated

Overview

This node operation subscribes to push notifications from a specified Mastodon instance. It allows users to provide subscription details such as the endpoint URL and cryptographic keys required for push notification delivery. Users can also configure which types of alerts they want to receive, such as mentions, new statuses, boosts, follows, and various admin notifications. This operation is useful for applications or workflows that need to receive real-time updates and notifications from a Mastodon instance via push notifications.

Use Case Examples

  1. A social media monitoring tool subscribing to mentions and new statuses to alert users in real-time.
  2. An admin dashboard subscribing to new sign-ups and reports notifications to manage community activities efficiently.

Properties

Name Meaning
Mastodon URL URL of the Mastodon instance to connect to, used to specify the target server for push notifications.
Authentication Type Method to authenticate with the Mastodon instance, either OAuth2 or Access Token.
Subscription Details of the push notification subscription including endpoint URL and cryptographic keys (P256DH key and Auth secret) required for push notification delivery.
Alerts Settings to specify which types of notifications to receive, such as mentions, new statuses, boosts, follows, follow requests, favourites, polls, status updates, and admin notifications for new sign-ups and reports.
Additional Fields Optional additional fields such as notification delivery policy to customize the subscription behavior.

Output

JSON

  • endpoint - The endpoint URL to receive push notifications.
  • keys
    • p256dh - User agent public key (Base64 encoded) used for push subscription.
    • auth - Auth secret (Base64 encoded) used for push subscription.
  • alerts
    • mention - Boolean indicating if notifications for mentions are enabled.
    • status - Boolean indicating if notifications for new statuses are enabled.
    • reblog - Boolean indicating if notifications for boosts are enabled.
    • follow - Boolean indicating if notifications for follows are enabled.
    • follow_request - Boolean indicating if notifications for follow requests are enabled.
    • favourite - Boolean indicating if notifications for favourites are enabled.
    • poll - Boolean indicating if notifications for polls are enabled.
    • update - Boolean indicating if notifications for status updates are enabled.
    • admin
      * sign_up - Boolean indicating if admin notifications for new sign-ups are enabled.
      * report - Boolean indicating if admin notifications for new reports are enabled.
  • additionalFields
    • policy - Optional notification delivery policy for the subscription.

Dependencies

  • Mastodon instance URL and authentication credentials (OAuth2 or Access Token) are required to connect and subscribe to push notifications.

Troubleshooting

  • Ensure that the correct authentication type is selected and corresponding credentials are provided; OAuth2 is required for some operations.
  • Verify that the Mastodon instance URL is correct and accessible.
  • Check that the subscription endpoint URL and keys are correctly provided and properly encoded in Base64.
  • If the node throws an error about an unimplemented operation, verify that the resource and operation names are correctly set.

Discussion