1
1
Fork
You've already forked gts-scripts
0
This is a collection of useful GoToSocial scripts.
  • Python 100%
2026年03月24日 15:10:19 +01:00
.gitignore Update authorization flow: A webbrowser is no being opened. 2026年03月24日 15:10:19 +01:00
gts-oauth.py Update authorization flow: A webbrowser is no being opened. 2026年03月24日 15:10:19 +01:00
gts-upload-emojis.py Update authorization flow: A webbrowser is no being opened. 2026年03月24日 15:10:19 +01:00
README.md Update authorization flow: A webbrowser is no being opened. 2026年03月24日 15:10:19 +01:00

gts-scripts

This is a collection of useful GoToSocial scripts.

gts-oauth.py

Dependencies: python3-mastodon

This script executes the OAuth process in GTS and provides the bearer token.

Before executing the script following changes are to be considered in the script:

  • Change INSTANCE_URL value to match your instance URL.
  • Change APP_NAME to match your desired application name.
  • The script requests read, write, admin:read, and admin:write credentials. If this is not what you want, you can change the script accordingly.

To execute the script call:

gts-oauth.py

During execution, the script creates registers a new app and stores the app id and secret in the file clientcred.secret. If this file already exists, then no new app will be registered. Instead the same app for the OAuth process will be used. You might want to delete this file before execution to create a new app.

The app will redirect to a local webserver and starts your web browser in order to authenticate. Please authenticate in the browser with your user email address, password and 2FA token (if enabled).

After the successful authorization the file usercred.secret is being created. In the first line of this file you find the bearer token that you can use for API calls.

gts-upload-emojis.py

This script processes MissKey compatible custom emoji packages and uploads the emojis to the GTS instance.

Before executing the script following changes are to be considered in the script:

  • Change the API_URL so that it fits the URL of your GTS instance.

To execute the script call:

gts-upload-emojis.py emoji_archive_file
  • emoji-arch-file is the MissKey compatible ZIP file containing the emoji files and meta.json file.