Skip to content

Commit 3b1df25

Browse files
zimegClaude
andauthored
feat: add admin.slackbot.skills.publish method example (#376)
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 093d364 commit 3b1df25

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎methods/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $ slack run chat_post_message.py # Make the request
2020

2121
- **[admin.conversations.bulkSetProperties](https://docs.slack.dev/reference/methods/admin.conversations.bulkSetProperties)**: Set properties on channels in bulk. [Implementation](./src/admin/conversations/admin_conversations_bulk_set_properties.py).
2222
- **[admin.slackbot.skills.list](https://docs.slack.dev/reference/methods/admin.slackbot.skills.list)**: Lists metadata for Slackbot skills owned by an organization. [Implementation](./src/admin/slackbot/skills/admin_slackbot_skills_list.py).
23+
- **[admin.slackbot.skills.publish](https://docs.slack.dev/reference/methods/admin.slackbot.skills.publish)**: Publishes Slackbot skills to an organization's catalog. [Implementation](./src/admin/slackbot/skills/admin_slackbot_skills_publish.py).
2324

2425
### agents
2526

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
3+
from slack_sdk import WebClient
4+
5+
# Read a token from an environment variable
6+
token = os.environ.get("SLACK_TOKEN")
7+
8+
# Initialize
9+
client = WebClient(token=token)
10+
11+
# Call the admin.slackbot.skills.publish method
12+
response = client.admin_slackbot_skills_publish(
13+
skill_ids=["F0123ABCD"],
14+
)
15+
16+
# Inspect the response
17+
print(response)

‎methods/src/admin/slackbot/skills/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
},
66
"oauth_config": {
77
"scopes": {
8-
"user": ["admin.skills:read"]
8+
"user": ["admin.skills:read", "admin.skills:write"]
99
}
1010
},
1111
"settings": {

0 commit comments

Comments
 (0)