💾 Archived View for gem.xmgz.eu › gemlog › 2022-10-14-toot-cli-gts.gmi captured on 2024-02-05 at 09:41:45. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-03-20)
-=-=-=-=-=-=-
admin user at your instance will inform you about your credentials:
toot cli is
a CLI and TUI tool for interacting with Mastodon instances from the command line.
so you can use it in programs, scripts, alias, etc.
In order to use toot you need a auth key from your instance.
After installing toot open a terminal and write (as regular user) and execute toot login to authorize toot to use your account
[user@host]$ toot login Creating config file at /home/user/.config/toot/config.json Choose an instance [mastodon.social]: gts.tld.org Looking up instance info... Found instance GoToSocial' Social Instance running Mastodon version 0.5.2 Registering application... Application tokens saved. This authentication method requires you to log into your Mastodon instance in your browser, where you will be asked to authorize toot to access your account. When you do, you will be given an authorization code which you need to paste here. This is the login URL: https://gts.tld.org/oauth/authorize/?response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=read+write+follow&client_id=CLIENTKEYVERYLONGHEXVALUE Open link in default browser? [Y/n] Authorization code:
if you hit Enter (Y default), then your system's default browser opens a login page in your instance.
if you select n (press n then Enter), browser is not opened and prompt keeps awaiting for your authorization code. You can copy/paste in any browser the complete login URL to get auth code:
In both cases the result is the same. Keep this terminal opened and go to your browser.
Before even writing your credentials, press F12 and select tab Console in the development tools of your browser. Keep it opened so you can see what's happening and see auth code.
Now, enter credentials and Allow your user to request authorization code
Back in Console, Headers tab, there's a POST element with a dropdown arrow; click on it to open this element. You've to look for location urn:ietf:wg:oauth:2.0:oob?code=YMQ2N2E3-VERYLONGAUTHKEY-NINTQ0MTA3MWI0 info.
This is the Auth Code you need to paste in toot prompt
Authorization code: YMQ2N2E3-VERYLONGAUTHKEY-NINTQ0MTA3MWI0 Requesting access token... Access token saved to config at: /home/user/.config/toot/config.json ✓ Successfully logged in.
press Enter and then you should be able to post from toot cli.
~~~