Skip to content

Instantly share code, notes, and snippets.

@trufae
Last active May 23, 2023 13:27
Show Gist options
  • Save trufae/5d0ce587cd8f42d15313e4b887b28fa2 to your computer and use it in GitHub Desktop.
Save trufae/5d0ce587cd8f42d15313e4b887b28fa2 to your computer and use it in GitHub Desktop.
toot.sh
#!/bin/sh
TOKEN="##PUT##YOUR##KEY##HERE"
MESSAGE="$1"
INSTANCE="c.im"
curl --header "Authorization: Bearer ${TOKEN}" \
--form "status=${MESSAGE}" \
"https://${INSTANCE}/api/v1/statuses"
@radare
Copy link

radare commented May 23, 2023

wget --method=POST \
  --header="Authorization: Bearer "${TOKEN} \
  --output-document - \
  -D "status="${MESSAGE}" \
  https://${INSTANCE}'/api/v1/statuses'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment