Okada Hiroshi の blog

typo が多いです

Mastodn API を叩くための access token を取得するコマンドラインプログラムを node.jsで書きました。

Mastodn API を叩くための OAuth2 の access token を取得する。コマンドコマンドラインツールを node.js で書いてみました。

www.npmjs.com

(途中でブラウザが立ち上がります。)

npm を公開するにのは初めてだったので、数日かかってしましましたが、これで bot を作るのが楽になったと思います。

なお、 mastodon の場合

config/initializers/doorkeeper.rb

# Access token expiration time (default 2 hours).
# If you want to disable expiration, set this to nil.
 access_token_expires_in nil

となっているので、 access_token の更新はしなくても良いようです。