Skip to content

Instantly share code, notes, and snippets.

@gutocarvalho
Last active April 11, 2023 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gutocarvalho/f96f5e025e03abfe6ceb3c2d9b4f1f1f to your computer and use it in GitHub Desktop.
Save gutocarvalho/f96f5e025e03abfe6ceb3c2d9b4f1f1f to your computer and use it in GitHub Desktop.
#!/bin/bash
# Enter the name of the Mastodon instance you want to publish a toot to
INSTANCE="bolha.us"
# Enter the contents of the toot you want to publish
TOOT="e a noite vai virar dia..."
## Replace TOKEN with your Mastodon TOKEN
TOKEN="YOUR TOKEN"
echo "Publishing a toot to $INSTANCE..."
curl https://"${INSTANCE}"/api/v1/statuses -H "Authorization: Bearer ${TOKEN}" -F "status=${TOOT}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment