Skip to content

Commit 7675e83

Browse files
links
1 parent 53ceb1c commit 7675e83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+272
-272
lines changed

docs/english/_sidebar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
{
107107
"type": "link",
108108
"label": "Reference",
109-
"href": "https://docs.slack.dev/bolt-python/reference/index.html"
109+
"href": "/bolt-python/reference/index.html"
110110
},
111111
{ "type": "html", "value": "<hr>" },
112112
{

docs/english/building-an-app.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ Look around, add an app icon and description, and then let's start configuring y
3131
---
3232

3333
### Tokens and installing apps {#tokens-and-installing-apps}
34-
Slack apps use [OAuth to manage access to Slack's APIs](https://docs.slack.dev/authentication/installing-with-oauth). When an app is installed, you'll receive a token that the app can use to call API methods.
34+
Slack apps use [OAuth to manage access to Slack's APIs](/authentication/installing-with-oauth). When an app is installed, you'll receive a token that the app can use to call API methods.
3535

3636
There are three main token types available to a Slack app: user (`xoxp`), bot (`xoxb`), and app-level (`xapp`) tokens.
37-
- [User tokens](https://docs.slack.dev/authentication/tokens#user) allow you to call API methods on behalf of users after they install or authenticate the app. There may be several user tokens for a single workspace.
38-
- [Bot tokens](https://docs.slack.dev/authentication/tokens#bot) are associated with bot users, and are only granted once in a workspace where someone installs the app. The bot token your app uses will be the same no matter which user performed the installation. Bot tokens are the token type that _most_ apps use.
39-
- [App-level tokens](https://docs.slack.dev/authentication/tokens#app-level) represent your app across organizations, including installations by all individual users on all workspaces in a given organization and are commonly used for creating WebSocket connections to your app.
37+
- [User tokens](/authentication/tokens#user) allow you to call API methods on behalf of users after they install or authenticate the app. There may be several user tokens for a single workspace.
38+
- [Bot tokens](/authentication/tokens#bot) are associated with bot users, and are only granted once in a workspace where someone installs the app. The bot token your app uses will be the same no matter which user performed the installation. Bot tokens are the token type that _most_ apps use.
39+
- [App-level tokens](/authentication/tokens#app-level) represent your app across organizations, including installations by all individual users on all workspaces in a given organization and are commonly used for creating WebSocket connections to your app.
4040

4141
We're going to use bot and app-level tokens for this guide.
4242

4343
1. Navigate to **OAuth & Permissions** on the left sidebar and scroll down to the **Bot Token Scopes** section. Click **Add an OAuth Scope**.
4444

45-
2. For now, we'll just add one scope: [`chat:write`](https://docs.slack.dev/reference/scopes/chat.write). This grants your app the permission to post messages in channels it's a member of.
45+
2. For now, we'll just add one scope: [`chat:write`](/reference/scopes/chat.write). This grants your app the permission to post messages in channels it's a member of.
4646

4747
3. Scroll up to the top of the **OAuth & Permissions** page and click **Install App to Workspace**. You'll be led through Slack's OAuth UI, where you should allow your app to be installed to your development workspace.
4848

@@ -56,7 +56,7 @@ We're going to use bot and app-level tokens for this guide.
5656

5757
:::tip[Not sharing is sometimes caring]
5858

59-
Treat your tokens like passwords and [keep them safe](https://docs.slack.dev/authentication/best-practices-for-security). Your app uses tokens to post and retrieve information from Slack workspaces.
59+
Treat your tokens like passwords and [keep them safe](/authentication/best-practices-for-security). Your app uses tokens to post and retrieve information from Slack workspaces.
6060

6161
:::
6262

@@ -104,7 +104,7 @@ $ export SLACK_APP_TOKEN=<your-app-level-token>
104104

105105
:::warning[Keep it secret. Keep it safe.]
106106

107-
Remember to keep your tokens secure. At a minimum, you should avoid checking them into public version control, and access them via environment variables as we've done above. Check out the API documentation for more on [best practices for app security](https://docs.slack.dev/authentication/best-practices-for-security).
107+
Remember to keep your tokens secure. At a minimum, you should avoid checking them into public version control, and access them via environment variables as we've done above. Check out the API documentation for more on [best practices for app security](/authentication/best-practices-for-security).
108108

109109
:::
110110

@@ -142,9 +142,9 @@ Your app should let you know that it's up and running. 🎉
142142
### Setting up events {#setting-up-events}
143143
Your app behaves similarly to people on your team — it can post messages, add emoji reactions, and listen and respond to events.
144144

145-
To listen for events happening in a Slack workspace (like when a message is posted or when a reaction is posted to a message) you'll use the [Events API to subscribe to event types](https://docs.slack.dev/apis/events-api/).
145+
To listen for events happening in a Slack workspace (like when a message is posted or when a reaction is posted to a message) you'll use the [Events API to subscribe to event types](/apis/events-api/).
146146

147-
For those just starting, we recommend using [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode). Socket Mode allows your app to use the Events API and interactive features without exposing a public HTTP Request URL. This can be helpful during development, or if you're receiving requests from behind a firewall.
147+
For those just starting, we recommend using [Socket Mode](/apis/events-api/using-socket-mode). Socket Mode allows your app to use the Events API and interactive features without exposing a public HTTP Request URL. This can be helpful during development, or if you're receiving requests from behind a firewall.
148148

149149
That being said, you're welcome to set up an app with a public HTTP Request URL. HTTP is more useful for apps being deployed to hosting environments to respond within a large corporate Slack workspaces/organization, or apps intended for distribution via the Slack Marketplace.
150150

@@ -169,22 +169,22 @@ When an event occurs, Slack will send your app some information about the event,
169169

170170
1. Go back to your app configuration page (click on the app [from your app management page](https://api.slack.com/apps)). Click **Event Subscriptions** on the left sidebar. Toggle the switch labeled **Enable Events**.
171171

172-
2. Add your Request URL. Slack will send HTTP POST requests corresponding to events to this [Request URL](https://docs.slack.dev/apis/events-api/#subscribing) endpoint. Bolt uses the `/slack/events` path to listen to all incoming requests (whether shortcuts, events, or interactivity payloads). When configuring your Request URL within your app configuration, you'll append `/slack/events`, e.g. `https://<your-domain>/slack/events`. 💡 As long as your Bolt app is still running, your URL should become verified.
172+
2. Add your Request URL. Slack will send HTTP POST requests corresponding to events to this [Request URL](/apis/events-api/#subscribing) endpoint. Bolt uses the `/slack/events` path to listen to all incoming requests (whether shortcuts, events, or interactivity payloads). When configuring your Request URL within your app configuration, you'll append `/slack/events`, e.g. `https://<your-domain>/slack/events`. 💡 As long as your Bolt app is still running, your URL should become verified.
173173

174174
:::tip[Using proxy services]
175175

176-
For local development, you can use a proxy service like ngrok to create a public URL and tunnel requests to your development environment. Refer to [ngrok's getting started guide](https://ngrok.com/docs#getting-started-expose) on how to create this tunnel. And when you get to hosting your app, we've collected some of the most common hosting providers Slack developers use to host their apps [on our API site](https://docs.slack.dev/distribution/hosting-slack-apps/).
176+
For local development, you can use a proxy service like ngrok to create a public URL and tunnel requests to your development environment. Refer to [ngrok's getting started guide](https://ngrok.com/docs#getting-started-expose) on how to create this tunnel. And when you get to hosting your app, we've collected some of the most common hosting providers Slack developers use to host their apps [on our API site](/distribution/hosting-slack-apps/).
177177

178178
:::
179179

180180
</TabItem>
181181
</Tabs>
182182

183183
Navigate to **Event Subscriptions** on the left sidebar and toggle to enable. Under **Subscribe to Bot Events**, you can add events for your bot to respond to. There are four events related to messages:
184-
- [`message.channels`](https://docs.slack.dev/reference/events/message.channels) listens for messages in public channels that your app is added to.
185-
- [`message.groups`](https://docs.slack.dev/reference/events/message.groups) listens for messages in 🔒 private channels that your app is added to.
186-
- [`message.im`](https://docs.slack.dev/reference/events/message.im) listens for messages in your app's DMs with users.
187-
- [`message.mpim`](https://docs.slack.dev/reference/events/message.mpim) listens for messages in multi-person DMs that your app is added to.
184+
- [`message.channels`](/reference/events/message.channels) listens for messages in public channels that your app is added to.
185+
- [`message.groups`](/reference/events/message.groups) listens for messages in 🔒 private channels that your app is added to.
186+
- [`message.im`](/reference/events/message.im) listens for messages in your app's DMs with users.
187+
- [`message.mpim`](/reference/events/message.mpim) listens for messages in multi-person DMs that your app is added to.
188188

189189
If you want your bot to listen to messages from everywhere it is added to, choose all four message events. After you’ve selected the events you want your bot to listen to, click the green **Save Changes** button.
190190

@@ -208,7 +208,7 @@ app = App(token=os.environ.get("SLACK_BOT_TOKEN"))
208208

209209
# Listens to incoming messages that contain "hello"
210210
# To learn available listener arguments,
211-
# visit https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html
211+
# visit https://docs.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html
212212
@app.message("hello")
213213
def message_hello(message, say):
214214
# say() sends a message to the channel where the event was triggered
@@ -234,7 +234,7 @@ app = App(
234234

235235
# Listens to incoming messages that contain "hello"
236236
# To learn available listener arguments,
237-
# visit https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html
237+
# visit https://docs.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html
238238
@app.message("hello")
239239
def message_hello(message, say):
240240
# say() sends a message to the channel where the event was triggered
@@ -476,8 +476,8 @@ Now that you have a basic app up and running, you can start exploring how to mak
476476

477477
* Read through the concepts pages to learn about the different methods and features your Bolt app has access to.
478478

479-
* Explore the different events your bot can listen to with the [`app.event()`](/concepts/event-listening) method. All of the events are listed [on the API docs site](https://docs.slack.dev/reference/events).
479+
* Explore the different events your bot can listen to with the [`app.event()`](/bolt-python/concepts/event-listening) method. All of the events are listed [on the API docs site](/reference/events).
480480

481-
* Bolt allows you to [call Web API methods](/concepts/web-api) with the client attached to your app. There are [over 200 methods](https://docs.slack.dev/reference/methods) on our API site.
481+
* Bolt allows you to [call Web API methods](/bolt-python/concepts/web-api) with the client attached to your app. There are [over 200 methods](/reference/methods) on our API site.
482482

483-
* Learn more about the different token types [on the API docs site](https://docs.slack.dev/authentication/tokens). Your app may need different tokens depending on the actions you want it to perform.
483+
* Learn more about the different token types [on the API docs site](/authentication/tokens). Your app may need different tokens depending on the actions you want it to perform.

docs/english/concepts/acknowledge.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ slug: /concepts/acknowledge
66

77
Actions, commands, shortcuts, options requests, and view submissions must **always** be acknowledged using the `ack()` function. This lets Slack know that the request was received so that it may update the Slack user interface accordingly.
88

9-
Depending on the type of request, your acknowledgement may be different. For example, when acknowledging a menu selection associated with an external data source, you would call `ack()` with a list of relevant [options](https://docs.slack.dev/reference/block-kit/composition-objects/option-object/). When acknowledging a view submission, you may supply a `response_action` as part of your acknowledgement to [update the view](/concepts/view_submissions).
9+
Depending on the type of request, your acknowledgement may be different. For example, when acknowledging a menu selection associated with an external data source, you would call `ack()` with a list of relevant [options](/reference/block-kit/composition-objects/option-object/). When acknowledging a view submission, you may supply a `response_action` as part of your acknowledgement to [update the view](/bolt-python/concepts/view_submissions).
1010

1111
We recommend calling `ack()` right away before initiating any time-consuming processes such as fetching information from your database or sending a new message, since you only have 3 seconds to respond before Slack registers a timeout error.
1212

13-
:::info[When working in a FaaS / serverless environment, our guidelines for when to `ack()` are different. See the section on [Lazy listeners (FaaS)](/concepts/lazy-listeners) for more detail on this.]
13+
:::info[When working in a FaaS / serverless environment, our guidelines for when to `ack()` are different. See the section on [Lazy listeners (FaaS)](/bolt-python/concepts/lazy-listeners) for more detail on this.]
1414

1515
:::
1616

17-
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
17+
Refer to [the module document](https://docs.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
1818
```python
1919
# Example of responding to an external_select options request
2020
@app.options("menu_selection")

docs/english/concepts/actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Your app can listen and respond to user actions, like button clicks, and menu se
1010

1111
Actions can be filtered on an `action_id` parameter of type `str` or `re.Pattern`. The `action_id` parameter acts as a unique identifier for interactive components on the Slack platform.
1212

13-
You'll notice in all `action()` examples, `ack()` is used. It is required to call the `ack()` function within an action listener to acknowledge that the request was received from Slack. This is discussed in the [acknowledging requests guide](/concepts/acknowledge).
13+
You'll notice in all `action()` examples, `ack()` is used. It is required to call the `ack()` function within an action listener to acknowledge that the request was received from Slack. This is discussed in the [acknowledging requests guide](/bolt-python/concepts/acknowledge).
1414

15-
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
15+
Refer to [the module document](https://docs.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
1616

1717
```python
1818
# Your listener will be called every time a block element with the action_id "approve_button" is triggered
@@ -49,7 +49,7 @@ There are two main ways to respond to actions. The first (and most common) way i
4949

5050
The second way to respond to actions is using `respond()`, which is a utility to use the `response_url` associated with the action.
5151

52-
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
52+
Refer to [the module document](https://docs.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
5353

5454
```python
5555
# Your listener will be called every time an interactive component with the action_id “approve_button” is triggered
@@ -62,7 +62,7 @@ def approve_request(ack, say):
6262

6363
### Using `respond()` method
6464

65-
Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass [all the message payload properties](https://docs.slack.dev/messaging/#payloads) as keyword arguments along with optional properties like `response_type` (which has a value of `"in_channel"` or `"ephemeral"`), `replace_original`, `delete_original`, `unfurl_links`, and `unfurl_media`. With that, your app can send a new message payload that will be published back to the source of the original interaction.
65+
Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass [all the message payload properties](/messaging/#payloads) as keyword arguments along with optional properties like `response_type` (which has a value of `"in_channel"` or `"ephemeral"`), `replace_original`, `delete_original`, `unfurl_links`, and `unfurl_media`. With that, your app can send a new message payload that will be published back to the source of the original interaction.
6666

6767
```python
6868
# Listens to actions triggered with action_id of “user_select”

0 commit comments

Comments
 (0)