Skip to content

Instantly share code, notes, and snippets.

@clifff
Last active March 10, 2023 18:58
Show Gist options
  • Save clifff/cf5efd856c79eed4f0bd4fbac4f4f60a to your computer and use it in GitHub Desktop.
Save clifff/cf5efd856c79eed4f0bd4fbac4f4f60a to your computer and use it in GitHub Desktop.
Post to Mastodon Airtable Script
  • Navigate to https://shakedown.social/settings/applications
  • Click "New Application", name it something like "Airtable"
  • Check off the write:statuses scope and uncheck all the other ones.
  • Click "Submit" at the bottom of the page.
  • Click into the "Airtable" application you just made.
  • Copy the value for "Your access token". Paste it into ACCESS_TOKEN_HERE in the script.
  • Populate STATUS_TEXT_HERE in the script with that status text you want.
let response = await fetch('https://shakedown.social/api/v1/statuses', {
method: 'POST',
body: JSON.stringify({
'status' : 'STATUS_TEXT_HERE',
'visibility': 'public'
}),
headers: {
'Authorization': 'Bearer ACCESS_TOKEN_HERE',
'Content-Type': 'application/json',
},
});
console.log(await response.json());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment