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
# create account
/app/gotosocial --config-path /app/config.yaml admin account create --username some_username --email --password 'SOME_PASSWORD'

# activate account
/app/gotosocial --config-path /app/config.yaml admin account confirm --username some_username

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: 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:
curl -X PATCH -H 'Authorization: Bearer ACCESS_TOKEN' -F 'bot=true' -F 'locked=false' -F 'display_name=test user' -F 'note=some note'

Send a toot

Three ways to send a status: curl, httpie or python-requests.

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 -H 'Authorization: Bearer ACCESS_TOKEN' -F 'status=toot via curl (private)' -F 'visibility=private'


http POST 'Authorization: Bearer ACCESS_TOKEN' 'status=toot via httpie (private)' 'visibility=private'


import requests
        "Authorization": "Bearer ACCESS_TOKEN"
    json={"status": "toot via requests (private)", "visibility": "private"},

The same code should work with httpx: replace requests with httpx.