Generate an access token for Mastodon.
- jq
For details on the Mastodon API, see API overview.
$ sh mastodon.sh
Enter your host: https://mastodon.social
Enter client name: My Mastodon App
Enter scope: read write follow
Enter website: (optional) http://myappwebsite.com
Access https://mastodon.social/oauth/authorize?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=read%20write%20follow and click "AUTHORIZE" button. Then copy the code and paste it here after the message "Enter authorization code".
Enter authorization code: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Your access token is zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.
Now you can use zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
as an access token to your Mastodon application.
Copy env.json.sample
to env.json
and edit env.json
.
$ cp env.json.sample env.json
# Edit env.json
The generator reads env.json
automatically if it exists.
$ sh mastodon.sh
Access https://mastodon.social/oauth/authorize?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=read%20write%20follow and click "AUTHORIZE" button. Then copy the code and paste it here after the message "Enter authorization code".
Enter authorization code: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Your access token is zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.
Now you can use zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
as an access token to your Mastodon application.
Copyright (c) 2017 noraworld - MIT License