Setup a bot on gotosocial
First, create a user
Because I closed registration this has to be done via the cli. Commands for my instance running on fly.io:
Setup Account
Most settings of an account can be changed via the user panel in gotosocial. But not the
bot=true
setting.For automation we need an app anyway, so lets create an app and use it to change user settings.
To get the accesstoken the easiest way is to use this site: https://takahashim.github.io/mastodon-access-token/. Set the scope to
write
!For the following commands we only need the access_token and not the client_id/client_secret.
The command to set
bot=true
, locked=false
, display_name
and note
:Send a toot
Please be aware of the visibility rules on your server!
Some servers don't want bots on the local timeline, so use
unlisted
instead of public
.My examples here are set to
private
. This is only to show how posting a status works.curl
httpie
python-requests
import requests requests.post( url="https://fedi.cress.space/api/v1/statuses", headers={ "Authorization": "Bearer ACCESS_TOKEN" }, json={"status": "toot via requests (private)", "visibility": "private"}, )
The same code should work with httpx: replace requests with httpx.