LoginSignup
0
0

More than 3 years have passed since last update.

Slack API の channels.infoが使えなくなった対策

Posted at

Slack API の channels.infoが使えなくなった対策

廃止されたAPI

2021/2/28で廃止された。
https://api.slack.com/methods/channels.info

移行戦略

基本は
https://api.slack.com/methods/conversations.info
に移行する

channelの以下ははAPIを変更するだけで仕様は同じ
unread_count,unread_count_display は廃止されたようだ。これは他のAPIでもなくなっているので、同じ流れか

id,name,is_channel,created,creator,is_archived,is_general,name_normalized,is_shared,is_org_shared,is_member,is_private,is_mpim,last_read,topic,purpose,previous_names

以下は追加されたもの

is_group,is_im,is_read_only,parent_conversation,locale

なお、複数チャンネル取得のAPI
https://api.slack.com/methods/conversations.list
と、基本的には同じデータが返ってくる。(last_readのみ無い)

membersは別APIになった

基本はそのまま使えばいいが、limitによる上限設定と、cursorによる継続取得のしくみがある。
limit規定値が100なので、メンバーが100人以上いるときは limit:1000 などと設定するか、
複数回にわけて取得する必要がある。

0
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
0
0