LoginSignup
3
0

More than 1 year has passed since last update.

Slack APIを用いた絵文字使用回数ランキングの取得

Last updated at Posted at 2022-07-16

Slack API アプリの作成、およびトークンの取得手順

の Create an app からアプリを作成。
App Name はemojiRankingなどにしておく。
Permissions > User Token Scopes に下記のスコープを追加する。

channels:history
channels:read
emoji:read
reactions:read

Install to Workspaceで絵文字データを取得したいワークスペースにアプリをインストールする。
User OAuth Token にxoxp-.......-........-..........のような長いトークンが発行されているので、他人に見られない形で保管しておく。

WebアプリにAPIトークンを入力

絵文字ランキングアプリ

注意点

・文字化け(?)で「:thumbsup:(+1) の+が消える」などのバグがあります。

・カスタム絵文字のみのランキングを作る場合は、各自でカスタム絵文字名のリストを用意していただく必要があります(Slack APIでカスタム絵文字名一覧を取得する方法が分からなかった)。

参考にした記事

Slack API アプリの作成手順

おわりに

本記事に関してアドバイス等ありましたらありがたいです。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0