Skip to content

Instantly share code, notes, and snippets.

@idleberg
Last active Nov 1, 2022
Embed
What would you like to do?
Connecting IFTTT with Mastodon

Connecting IFTT with Mastodon

As of the time of this writing, IFTTT has no integration for Mastodon. Yet, it's possible to connect the two.

Mastodon

  1. Login to your Mastodon account

  2. Go to Preferences > Developer and register a new application with write:statuses permission.

  3. Copy your access token, we're going to need this later

Testing

You might want to test your new application using cURL or Postman

cURL

curl -X POST "https://mastodon.social/api/v1/statuses?access_token=YOUR_API_KEY&status=YOLO"

IFTTT

  1. Login to your IFTTT account

  2. Enable Webhooks support

  3. You can now create new applets that post to Mastodon or edit existing ones to add an extra step (e.g. for posting to both, Twitter and Mastodon)

    • select the Webhooks service as target
    • select “Make a web request”
    • set URL to the statuses endpoint, e.g. https://mastodon.social/api/v1/statuses?access_token=YOUR_API_KEY
    • set Method to POST
    • set Content to application/x-www-form-urlencoded
    • set Body to your message, prefixed with supported form data parameters, e.g. status=My first automated post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment