Skip to content

Commit 2a697df

Browse files
web-flowdblock
authored andcommitted
Update API from slack-api-ref@d980b88 (2026-09-28)
- Add channel_ids argument to admin.apps.permissions.add and admin.apps.permissions.remove, and channel_restriction_mode/channel_ids arguments to admin.apps.permissions.set - Add oauth.v2.beginShortTokenRotation and oauth.v2.completeShortTokenRotation methods - Add session_status argument to chat.stopStream - Add include_list argument to slackLists.items.list - Update chat.startStream and chat.stopStream chunks argument documentation to mention markdown text, task update, plan update, and blocks chunk objects - Add new error codes including AgentPromptDisplayNotAllowed, ChannelRestrictionRequiresAppAccess, ChannelRestrictionsNotAvailable, RotationNotFound, TokenTooLong, TooManyChannels, UserIsExternalGuest, and UserNotAuthenticated
1 parent 2729209 commit 2a697df

12 files changed

Lines changed: 118 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add AgentsSessions and AppsManagedPermissions endpoint modules for agents.sessions and apps.managedPermissions methods - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
1818
* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Increase conversations.invite users limit from 100 to 1000 - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
1919
* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add new Slack API error codes - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
20+
* [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add channel_ids argument to admin.apps.permissions.add and admin.apps.permissions.remove, and channel_restriction_mode/channel_ids arguments to admin.apps.permissions.set - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
21+
* [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add oauth.v2.beginShortTokenRotation and oauth.v2.completeShortTokenRotation methods - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
22+
* [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add session_status argument to chat.stopStream - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
23+
* [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add include_list argument to slackLists.items.list - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
24+
* [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Update chat.startStream and chat.stopStream chunks argument documentation to mention markdown text, task update, plan update, and blocks chunk objects - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
25+
* [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add new error codes including AgentPromptDisplayNotAllowed, ChannelRestrictionRequiresAppAccess, ChannelRestrictionsNotAvailable, RotationNotFound, TokenTooLong, TooManyChannels, UserIsExternalGuest, and UserNotAuthenticated - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
2026
* Your contribution here.
2127

2228
### 3.2.0 (2026/07/05)

‎bin/commands/admin_apps_permissions.rb‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class App
1212
c.flag 'app_id', desc: 'Encoded ID of the app.'
1313
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
1414
c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
15+
c.flag 'channel_ids', desc: "List of encoded channel IDs to add to the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method."
1516
c.action do |_global_options, options, _args|
1617
puts JSON.dump(@client.admin_apps_permissions_add(options))
1718
end
@@ -32,6 +33,7 @@ class App
3233
c.flag 'app_id', desc: 'Encoded ID of the app.'
3334
c.flag 'user_ids', desc: 'List of user IDs whose named_entities access will be revoked.'
3435
c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
36+
c.flag 'channel_ids', desc: "List of encoded channel IDs to remove from the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method."
3537
c.action do |_global_options, options, _args|
3638
puts JSON.dump(@client.admin_apps_permissions_remove(options))
3739
end
@@ -44,6 +46,8 @@ class App
4446
c.flag 'permission_type', desc: 'The type of permission that defines who can access the app.'
4547
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
4648
c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
49+
c.flag 'channel_restriction_mode', desc: 'The mode that defines where the app can be used in channels.'
50+
c.flag 'channel_ids', desc: 'List of encoded channel IDs for channel restrictions. Semantics depend on channel_restriction_mode: allowlist for specific_channels, exclusion list for all_channels_except.'
4751
c.action do |_global_options, options, _args|
4852
puts JSON.dump(@client.admin_apps_permissions_set(options))
4953
end

‎bin/commands/chat.rb‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class App
146146
g.long_desc %( Starts a new streaming conversation. )
147147
g.command 'startStream' do |c|
148148
c.flag 'channel', desc: 'An encoded ID that represents a channel, thread, or DM.'
149-
c.flag 'chunks', desc: 'Array of streaming chunks.'
149+
c.flag 'chunks', desc: 'Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.'
150150
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
151151
c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Omit it to stream a top-level message instead of a thread reply; this is only supported in channels where the whole channel is one session, such as Slack Code, and returns invalid_thread_ts elsewhere. Passing '0' is equivalent to omitting it."
152152
c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
@@ -164,11 +164,12 @@ class App
164164
g.long_desc %( Stops a streaming conversation. )
165165
g.command 'stopStream' do |c|
166166
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
167-
c.flag 'chunks', desc: 'Array of streaming chunks.'
167+
c.flag 'chunks', desc: 'Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.'
168168
c.flag 'ts', desc: 'The timestamp of the streaming message.'
169169
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
170170
c.flag 'blocks', desc: 'A list of blocks that will be rendered at the bottom of the finalized message.'
171171
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
172+
c.flag 'session_status', desc: 'The session status to set after stopping the stream.'
172173
c.action do |_global_options, options, _args|
173174
puts JSON.dump(@client.chat_stopStream(options))
174175
end

‎bin/commands/oauth_v2.rb‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ class App
2222
end
2323
end
2424

25+
g.desc 'Call this to rotate the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.completeShortTokenRotation to confirm the change.'
26+
g.long_desc %( Call this to rotate the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.completeShortTokenRotation to confirm the change. )
27+
g.command 'beginShortTokenRotation' do |c|
28+
c.flag 'client_id', desc: 'Issued when you created your application. Must be the app the token being rotated was issued to.'
29+
c.flag 'client_secret', desc: 'Issued when you created your application.'
30+
c.action do |_global_options, options, _args|
31+
puts JSON.dump(@client.oauth_v2_beginShortTokenRotation(options))
32+
end
33+
end
34+
35+
g.desc 'Call this to finish rotating the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.beginShortTokenRotation to start the process.'
36+
g.long_desc %( Call this to finish rotating the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.beginShortTokenRotation to start the process. )
37+
g.command 'completeShortTokenRotation' do |c|
38+
c.flag 'client_id', desc: 'Issued when you created your application. Must be the app the token being rotated was issued to.'
39+
c.flag 'client_secret', desc: 'Issued when you created your application.'
40+
c.flag 'new_token', desc: 'The new xoxp token returned by oauth.v2.beginShortTokenRotation.'
41+
c.action do |_global_options, options, _args|
42+
puts JSON.dump(@client.oauth_v2_completeShortTokenRotation(options))
43+
end
44+
end
45+
2546
g.desc 'Exchanges a legacy access token for a new expiring access token and refresh token'
2647
g.long_desc %( Exchanges a legacy access token for a new expiring access token and refresh token )
2748
g.command 'exchange' do |c|

‎bin/commands/slackLists_items.rb‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class App
5656
c.flag 'limit', desc: 'The maximum number of records to return.'
5757
c.flag 'cursor', desc: 'Next cursor for pagination.'
5858
c.flag 'archived', desc: 'Boolean indicating whether archived items or normal items should be returned.'
59+
c.flag 'include_list', desc: 'Set to true to also return the parent list object, including its title, column schema, and total row count. Defaults to false to keep the response small.'
5960
c.action do |_global_options, options, _args|
6061
puts JSON.dump(@client.slackLists_items_list(options))
6162
end

‎lib/slack/web/api/endpoints/admin_apps_permissions.rb‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module AdminAppsPermissions
1515
# List of user IDs to allow for named_entities visibility.
1616
# @option options [array] :usergroup_ids
1717
# List of encoded usergroup IDs.
18+
# @option options [array] :channel_ids
19+
# List of encoded channel IDs to add to the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method.
1820
# @see https://api.slack.com/methods/admin.apps.permissions.add
1921
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.permissions/admin.apps.permissions.add.json
2022
def admin_apps_permissions_add(options = {})
@@ -43,6 +45,8 @@ def admin_apps_permissions_list(options = {})
4345
# List of user IDs whose named_entities access will be revoked.
4446
# @option options [array] :usergroup_ids
4547
# List of encoded usergroup IDs.
48+
# @option options [array] :channel_ids
49+
# List of encoded channel IDs to remove from the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method.
4650
# @see https://api.slack.com/methods/admin.apps.permissions.remove
4751
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.permissions/admin.apps.permissions.remove.json
4852
def admin_apps_permissions_remove(options = {})
@@ -61,6 +65,10 @@ def admin_apps_permissions_remove(options = {})
6165
# List of user IDs to allow for named_entities visibility.
6266
# @option options [array] :usergroup_ids
6367
# List of encoded usergroup IDs.
68+
# @option options [enum] :channel_restriction_mode
69+
# The mode that defines where the app can be used in channels.
70+
# @option options [array] :channel_ids
71+
# List of encoded channel IDs for channel restrictions. Semantics depend on channel_restriction_mode: allowlist for specific_channels, exclusion list for all_channels_except.
6472
# @see https://api.slack.com/methods/admin.apps.permissions.set
6573
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.permissions/admin.apps.permissions.set.json
6674
def admin_apps_permissions_set(options = {})

‎lib/slack/web/api/endpoints/chat.rb‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def chat_scheduleMessage(options = {})
253253
# @option options [channel] :channel
254254
# An encoded ID that represents a channel, thread, or DM.
255255
# @option options [array] :chunks
256-
# Array of streaming chunks.
256+
# Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.
257257
# @option options [string] :markdown_text
258258
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
259259
# @option options [string] :thread_ts
@@ -284,7 +284,7 @@ def chat_startStream(options = {})
284284
# @option options [channel] :channel
285285
# An encoded ID that represents a channel, private group, or DM.
286286
# @option options [array] :chunks
287-
# Array of streaming chunks.
287+
# Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.
288288
# @option options [timestamp] :ts
289289
# The timestamp of the streaming message.
290290
# @option options [string] :markdown_text
@@ -293,6 +293,8 @@ def chat_startStream(options = {})
293293
# A list of blocks that will be rendered at the bottom of the finalized message.
294294
# @option options [string] :metadata
295295
# JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.
296+
# @option options [enum] :session_status
297+
# The session status to set after stopping the stream.
296298
# @see https://api.slack.com/methods/chat.stopStream
297299
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.stopStream.json
298300
def chat_stopStream(options = {})

‎lib/slack/web/api/endpoints/oauth_v2.rb‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,39 @@ def oauth_v2_access(options = {})
3131
post('oauth.v2.access', options)
3232
end
3333

34+
#
35+
# Call this to rotate the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.completeShortTokenRotation to confirm the change.
36+
#
37+
# @option options [string] :client_id
38+
# Issued when you created your application. Must be the app the token being rotated was issued to.
39+
# @option options [string] :client_secret
40+
# Issued when you created your application.
41+
# @see https://api.slack.com/methods/oauth.v2.beginShortTokenRotation
42+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.beginShortTokenRotation.json
43+
def oauth_v2_beginShortTokenRotation(options = {})
44+
raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil?
45+
raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil?
46+
post('oauth.v2.beginShortTokenRotation', options)
47+
end
48+
49+
#
50+
# Call this to finish rotating the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.beginShortTokenRotation to start the process.
51+
#
52+
# @option options [string] :client_id
53+
# Issued when you created your application. Must be the app the token being rotated was issued to.
54+
# @option options [string] :client_secret
55+
# Issued when you created your application.
56+
# @option options [string] :new_token
57+
# The new xoxp token returned by oauth.v2.beginShortTokenRotation.
58+
# @see https://api.slack.com/methods/oauth.v2.completeShortTokenRotation
59+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.completeShortTokenRotation.json
60+
def oauth_v2_completeShortTokenRotation(options = {})
61+
raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil?
62+
raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil?
63+
raise ArgumentError, 'Required arguments :new_token missing' if options[:new_token].nil?
64+
post('oauth.v2.completeShortTokenRotation', options)
65+
end
66+
3467
#
3568
# Exchanges a legacy access token for a new expiring access token and refresh token
3669
#

‎lib/slack/web/api/endpoints/slackLists_items.rb‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def slackLists_items_info(options = {})
8282
# Next cursor for pagination.
8383
# @option options [boolean] :archived
8484
# Boolean indicating whether archived items or normal items should be returned.
85+
# @option options [boolean] :include_list
86+
# Set to true to also return the parent list object, including its title, column schema, and total row count. Defaults to false to keep the response small.
8587
# @see https://api.slack.com/methods/slackLists.items.list
8688
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.list.json
8789
def slackLists_items_list(options = {})

0 commit comments

Comments
 (0)