Update: was able to get a Mastodon bot working sometime in 2018.
I could use assistance from anyone familiar with the process of getting bots working with Mastodon. I got as far as being able to connect to an instance and get public information, but anything beyond that seems to require creating or accessing some kind of key (a "shared secret", I think?) and I don't know how to do that.
I'll be writing in PHP, but you don't have to know PHP to be helpful; I think I mainly need to know what the process is in an algorithmic kind of way. Tell me what needs to happen, and I can figure out how to make PHP do it.
The same applies for Discord bot authorship, although my needs for that are less immediate.
- There must be a more automated way to get the codes through the API, but the manual method is fine if you're setting up a bot or two.
- (Some instances don't allow bots, or have special rules for them, so make sure you check the terms and conditions. If in doubt, use botsin.space.)
- Once you have the access tokens for your application, you need to add the following header in the HTTP requests when using an API call needing authorization:
"Authorization: Bearer <access_token>"
- Replace <access_token> with the one displayed on your application page.
- The client ID and secret are only needed when making a "login with Mastodon" feature on an application.
- The only bots I've done were ones that post from RSS feeds, but if taking a lot at the code for those would help it's:
- It's a little Python thing. IIRC it automated getting the token, but you still had to sign-in to give the bot posting access?