From bef11ae2e5f6ee6ec87d2466ec610acb6d412508 Mon Sep 17 00:00:00 2001 From: Haley Elmendorf Date: Thu, 10 Apr 2025 09:45:09 -0500 Subject: [PATCH] update docs links --- docs/content/guides/ai-apps.md | 34 +++++++++---------- docs/content/guides/app-distribution.md | 22 ++++++------ docs/content/guides/app-home.md | 12 +++---- docs/content/guides/audit-logs-api.md | 6 ++-- docs/content/guides/bolt-basics.md | 8 ++--- docs/content/guides/composing-messages.md | 8 ++--- docs/content/guides/events-api.md | 10 +++--- .../guides/getting-started-with-bolt.md | 18 +++++----- docs/content/guides/incoming-webhooks.md | 2 +- docs/content/guides/interactive-components.md | 10 +++--- docs/content/guides/modals.md | 24 ++++++------- docs/content/guides/rtm.md | 2 +- docs/content/guides/scim-api.md | 8 ++--- docs/content/guides/shortcuts.md | 8 ++--- docs/content/guides/sign-in-with-slack.md | 4 +-- docs/content/guides/slash-commands.md | 8 ++--- docs/content/guides/socket-mode.md | 4 +-- docs/content/guides/status-api.md | 2 +- docs/content/guides/steps-from-apps.md | 18 +++++----- docs/content/guides/web-api-basics.md | 30 ++++++++-------- docs/content/guides/web-api-for-admins.md | 4 +-- docs/content/reference.md | 6 ++-- .../current/guides/app-distribution.md | 22 ++++++------ .../current/guides/app-home.md | 12 +++---- .../current/guides/assistants.md | 4 +-- .../current/guides/audit-logs-api.md | 6 ++-- .../current/guides/bolt-basics.md | 8 ++--- .../current/guides/composing-messages.md | 8 ++--- .../current/guides/events-api.md | 10 +++--- .../getting-started-with-bolt-socket-mode.md | 16 ++++----- .../guides/getting-started-with-bolt.md | 14 ++++---- .../current/guides/incoming-webhooks.md | 2 +- .../current/guides/interactive-components.md | 10 +++--- .../current/guides/modals.md | 24 ++++++------- .../current/guides/rtm.md | 2 +- .../current/guides/scim-api.md | 8 ++--- .../current/guides/shortcuts.md | 8 ++--- .../current/guides/sign-in-with-slack.md | 4 +-- .../current/guides/slash-commands.md | 8 ++--- .../current/guides/socket-mode.md | 4 +-- .../current/guides/status-api.md | 2 +- .../current/guides/steps-from-apps.md | 16 ++++----- .../current/guides/web-api-basics.md | 30 ++++++++-------- .../current/guides/web-api-for-admins.md | 4 +-- .../current/reference.md | 2 +- docs/navbarConfig.js | 2 +- docs/src/css/custom.css | 6 ++-- 47 files changed, 240 insertions(+), 240 deletions(-) diff --git a/docs/content/guides/ai-apps.md b/docs/content/guides/ai-apps.md index eda913cf6..e5424608d 100644 --- a/docs/content/guides/ai-apps.md +++ b/docs/content/guides/ai-apps.md @@ -9,29 +9,29 @@ If you don't have a paid workspace for development, you can join the [Developer ::: -AI apps comprise a new messaging experience for Slack. If you're unfamiliar with using AI apps within Slack, you'll want to read the [API documentation on the subject](https://api.slack.com/docs/apps/ai). Then come back here to implement them with Bolt! +AI apps comprise a new messaging experience for Slack. If you're unfamiliar with using AI apps within Slack, you'll want to read the [API documentation on the subject](https://docs.slack.dev/ai/). Then come back here to implement them with Bolt! ## Configuring your app to support AI apps features {#configuring-your-app} 1. Within [App Settings](https://api.slack.com/apps), enable the **Agents & AI Apps** feature. 2. Within the App Settings **OAuth & Permissions** page, add the following scopes: - * [`assistant:write`](https://api.slack.com/scopes/assistant:write) - * [`chat:write`](https://api.slack.com/scopes/chat:write) - * [`im:history`](https://api.slack.com/scopes/im:history) + * [`assistant:write`](https://docs.slack.dev/reference/scopes/assistant.write) + * [`chat:write`](https://docs.slack.dev/reference/scopes/chat.write) + * [`im:history`](https://docs.slack.dev/reference/scopes/im.history) 3. Within the App Settings **Event Subscriptions** page, subscribe to the following events: - * [`assistant_thread_started`](https://api.slack.com/events/assistant_thread_started) - * [`assistant_thread_context_changed`](https://api.slack.com/events/assistant_thread_context_changed) - * [`message.im`](https://api.slack.com/events/message.im) + * [`assistant_thread_started`](https://docs.slack.dev/reference/events/assistant_thread_started) + * [`assistant_thread_context_changed`](https://docs.slack.dev/reference/events/assistant_thread_context_changed) + * [`message.im`](https://docs.slack.dev/reference/events/message.im) ## The `Assistant` class instance {#assistant-class} The [`Assistant`](/reference#the-assistantconfig-configuration-object) class can be used to handle the incoming events expected from a user interacting with an AI app in Slack. A typical flow would look like: -1. [The user starts a thread](#handling-a-new-thread). The `Assistant` class handles the incoming [`assistant_thread_started`](https://api.slack.com/events/assistant_thread_started) event. -2. [The thread context may change at any point](#handling-thread-context-changes). The `Assistant` class can handle any incoming [`assistant_thread_context_changed`](https://api.slack.com/events/assistant_thread_context_changed) events. The class also provides a default `context` store to keep track of thread context changes as the user moves through Slack. -3. [The user responds](#handling-user-response). The `Assistant` class handles the incoming [`message.im`](https://api.slack.com/events/message.im) event. +1. [The user starts a thread](#handling-a-new-thread). The `Assistant` class handles the incoming [`assistant_thread_started`](https://docs.slack.dev/reference/events/assistant_thread_started) event. +2. [The thread context may change at any point](#handling-thread-context-changes). The `Assistant` class can handle any incoming [`assistant_thread_context_changed`](https://docs.slack.dev/reference/events/assistant_thread_context_changed) events. The class also provides a default `context` store to keep track of thread context changes as the user moves through Slack. +3. [The user responds](#handling-user-response). The `Assistant` class handles the incoming [`message.im`](https://docs.slack.dev/reference/events/message.im) event. ```java App app = new App(); @@ -71,7 +71,7 @@ assistant.userMessage((req, ctx) -> { app.assistant(assistant); ``` -While the `assistant_thread_started` and `assistant_thread_context_changed` events do provide Slack-client thread context information, the `message.im` event does not. Any subsequent user message events won't contain thread context data. For that reason, Bolt not only provides a way to store thread context — the `threadContextService` property — but it also provides a `DefaultAssistantThreadContextService` instance that is utilized by default. This implementation relies on storing and retrieving [message metadata](https://api.slack.com/metadata/using) as the user interacts with the app. +While the `assistant_thread_started` and `assistant_thread_context_changed` events do provide Slack-client thread context information, the `message.im` event does not. Any subsequent user message events won't contain thread context data. For that reason, Bolt not only provides a way to store thread context — the `threadContextService` property — but it also provides a `DefaultAssistantThreadContextService` instance that is utilized by default. This implementation relies on storing and retrieving [message metadata](https://docs.slack.dev/messaging/message-metadata/) as the user interacts with the app. If you do provide your own `threadContextService` property, it must feature `get` and `save` methods. @@ -81,7 +81,7 @@ Be sure to give the [AI apps reference docs](/reference#agents--assistants) a lo ## Handling a new thread {#handling-a-new-thread} -When the user opens a new thread with your AI app, the [`assistant_thread_started`](https://api.slack.com/events/assistant_thread_started) event will be sent to your app. +When the user opens a new thread with your AI app, the [`assistant_thread_started`](https://docs.slack.dev/reference/events/assistant_thread_started) event will be sent to your app. :::tip When a user opens a thread with your app while in a channel, the channel info is stored as the thread's `AssistantThreadContext` data. You can grab that info by using the `context.getThreadContext()` utility, as subsequent user message event payloads won't include the channel info. @@ -89,7 +89,7 @@ When a user opens a thread with your app while in a channel, the channel info is ### Block Kit interactions in the AI app thread {#block-kit-interactions} -For advanced use cases, Block Kit buttons may be used instead of suggested prompts, as well as the sending of messages with structured [metadata](https://api.slack.com/metadata) to trigger subsequent interactions with the user. +For advanced use cases, Block Kit buttons may be used instead of suggested prompts, as well as the sending of messages with structured [metadata](https://docs.slack.dev/messaging/message-metadata/) to trigger subsequent interactions with the user. For example, an app can display a button like "Summarize the referring channel" in the initial reply. When the user clicks the button and submits detailed information (such as the number of messages, days to check, the purpose of the summary, etc.), the app can handle that information and post a message that describes the request with structured metadata. @@ -175,9 +175,9 @@ app.assistant(assistant); ## Handling thread context changes {#handling-thread-context-changes} -When the user switches channels, the [`assistant_thread_context_changed`](https://api.slack.com/events/assistant_thread_context_changed) event will be sent to your app. +When the user switches channels, the [`assistant_thread_context_changed`](https://docs.slack.dev/reference/events/assistant_thread_context_changed) event will be sent to your app. -If you use the built-in `Assistant` middleware without any custom configuration, the updated context data is automatically saved as [message metadata](https://api.slack.com/metadata/using) of the first reply from the assistant bot. +If you use the built-in `Assistant` middleware without any custom configuration, the updated context data is automatically saved as [message metadata](https://docs.slack.dev/messaging/message-metadata/) of the first reply from the assistant bot. As long as you use the built-in approach, you don't need to store the context data within a datastore. The downside of this default behavior is the overhead of additional calls to the Slack API. These calls include those to `conversations.history`, which are used to look up the stored message metadata that contains the thread context (via `context.getThreadContextService().findCurrentContext(channelId, threadTs)`). @@ -189,9 +189,9 @@ Assistant assistant = new Assistant(new YourOwnAssistantThreadContextService()); ## Handling the user response {#handling-user-response} -When the user messages your app, the [`message.im`](https://api.slack.com/events/message.im) event will be sent to your app. +When the user messages your app, the [`message.im`](https://docs.slack.dev/reference/events/message.im) event will be sent to your app. -Messages sent to the app do not contain a [subtype](https://api.slack.com/events/message#subtypes) and must be deduced based on their shape and any provided [message metadata](https://api.slack.com/metadata/using). +Messages sent to the app do not contain a [subtype](https://docs.slack.dev/reference/events/message) and must be deduced based on their shape and any provided [message metadata](https://docs.slack.dev/messaging/message-metadata/). There are three utilities that are particularly useful in curating the user experience: * [`say`](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/#slack_bolt.Say) diff --git a/docs/content/guides/app-distribution.md b/docs/content/guides/app-distribution.md index f8c86b449..f49bff5ff 100644 --- a/docs/content/guides/app-distribution.md +++ b/docs/content/guides/app-distribution.md @@ -4,10 +4,10 @@ lang: en # App Distribution (OAuth) -A newly created Slack app can only be installed in its development workspace in the beginning. By setting an OAuth Redirect URL and enabling [App Distribution](https://api.slack.com/start/distributing), the app becomes to be ready for installation in any other workspaces. +A newly created Slack app can only be installed in its development workspace in the beginning. By setting an OAuth Redirect URL and enabling [App Distribution](https://docs.slack.dev/distribution/), the app becomes to be ready for installation in any other workspaces. -* [Installing with OAuth](https://api.slack.com/authentication/oauth-v2) -* [Distributing Slack Apps](https://api.slack.com/start/distributing) +* [Installing with OAuth](https://docs.slack.dev/authentication/installing-with-oauth) +* [Distributing Slack Apps](https://docs.slack.dev/distribution/) ### Slack App Configuration @@ -15,7 +15,7 @@ To enable App Distribution, visit the [Slack App configuration page](http://api. For **Redirect URL**, Bolt apps respond to `https://{your app's public URL domain}/slack/oauth/callback` if you go with recommended settings. To know how to configure such settings, consult the list of the available env variables below in this page. -Bolt for Java automatically includes support for [org wide installations](https://api.slack.com/enterprise/apps) since version `1.4.0`. Org wide installations can be enabled in your app configuration settings under **Org Level Apps**. +Bolt for Java automatically includes support for [org wide installations](https://docs.slack.dev/enterprise-grid/) since version `1.4.0`. Org wide installations can be enabled in your app configuration settings under **Org Level Apps**. ### What Your Bolt App Does @@ -26,7 +26,7 @@ All your app needs to do to properly handle OAuth Flow are: * Append `client_id`, `scope`, `user_scope` (only for v2), and `state` to the URL * Provide an endpoint to handle user redirection from Slack * Make sure if the `state` parameter is valid - * Complete the installation by calling [oauth.v2.access](https://api.slack.com/methods/oauth.v2.access) (or [oauth.access](https://api.slack.com/methods/oauth.access) if you maintain legacy OAuth apps) method and store the acquired tokens + * Complete the installation by calling [oauth.v2.access](https://docs.slack.dev/reference/methods/oauth.v2.access) (or [oauth.access](https://docs.slack.dev/reference/methods/oauth.access) if you maintain legacy OAuth apps) method and store the acquired tokens * Provide the endpoints to navigate installers for the completion/cancellation of the installation flow * The URLs are usually somewhere else but Bolt has simple functionality to serve them @@ -147,23 +147,23 @@ SlackAppServer server = new SlackAppServer(new HashMap<>(Map.ofEntries( server.start(); // http://localhost:3000 ``` -If you want to turn [the token rotation feature](https://api.slack.com/authentication/rotation) on, your `InstallationService` should be compatible with it. Refer to the [v1.9.0 release notes](https://github.com/slackapi/java-slack-sdk/releases/tag/v1.9.0) for more details. +If you want to turn [the token rotation feature](https://docs.slack.dev/authentication/using-token-rotation) on, your `InstallationService` should be compatible with it. Refer to the [v1.9.0 release notes](https://github.com/slackapi/java-slack-sdk/releases/tag/v1.9.0) for more details. ### Granular Permission Apps or Classic Apps Slack has two types of OAuth flows for Slack app installations. The V2 (this is a bit confusing but it's not the version of OAuth spec, but the version of the Slack OAuth flow) OAuth flow enables Slack apps to request more granular permissions than the classic ones, especially for bot users. The differences between the two types are having `v2` in the endpoint to issue access tokens and the OAuth Authorization URL, plus some changes to the response data structure returned by the `oauth(.v2).access` endpoint. -#### [V2 OAuth 2.0 Flow](https://api.slack.com/authentication/oauth-v2) (default) +#### [V2 OAuth 2.0 Flow](https://docs.slack.dev/authentication/installing-with-oauth) (default) |-|-| |Authorization URL|`https://slack.com/oauth/v2/authorize`| -|Web API to issue access tokens|[`oauth.v2.access`](https://api.slack.com/methods/oauth.v2.access) ([Response](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthV2AccessResponse.java))| +|Web API to issue access tokens|[`oauth.v2.access`](https://docs.slack.dev/reference/methods/oauth.v2.access) ([Response](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthV2AccessResponse.java))| -#### [Classic OAuth Flow](https://api.slack.com/docs/oauth) +#### [Classic OAuth Flow](https://docs.slack.dev/authentication/installing-with-oauth) |-|-| |Authorization URL|`https://slack.com/oauth/authorize`| -|Web API to issue access tokens|[`oauth.access`](https://api.slack.com/methods/oauth.access) ([Response](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthAccessResponse.java))| +|Web API to issue access tokens|[`oauth.access`](https://docs.slack.dev/reference/methods/oauth.access) ([Response](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthAccessResponse.java))| By default, Bolt enables the V2 OAuth Flow over the classic one. It's configurable by **AppConfig**'s the setter method for `classicAppPermissionsEnabled`. The value is set to `false` by default. Change the flag to `true` to authorize your classic OAuth apps. @@ -258,7 +258,7 @@ public class SlackApp { #### Use the Built-in tokens_revoked / app_uninstalled Event Handlers -For secure data management for your customers and end-users, properly handling [tokens_revoked](https://api.slack.com/events/tokens_revoked) and [app_uninstalled](https://api.slack.com/events/app_uninstalled) events is crucial. Bolt for Java provides the built-in event handlers for these events, which seamlessly integrated with your `InstallationService`'s deletion methods. +For secure data management for your customers and end-users, properly handling [tokens_revoked](https://docs.slack.dev/reference/events/tokens_revoked) and [app_uninstalled](https://docs.slack.dev/reference/events/app_uninstalled) events is crucial. Bolt for Java provides the built-in event handlers for these events, which seamlessly integrated with your `InstallationService`'s deletion methods. ```java App app = new App(); diff --git a/docs/content/guides/app-home.md b/docs/content/guides/app-home.md index c39287c40..726a95fc6 100644 --- a/docs/content/guides/app-home.md +++ b/docs/content/guides/app-home.md @@ -4,7 +4,7 @@ lang: en # App Home -An [App Home](https://api.slack.com/surfaces/tabs/events) is a private, one-to-one space in Slack shared by a user and an app. Each App Home contains a number of tabbed surfaces, including a Messages tab for app-user conversation, and a Home tab that can be fully customized by the app. +An [App Home](https://docs.slack.dev/surfaces/app-home) is a private, one-to-one space in Slack shared by a user and an app. Each App Home contains a number of tabbed surfaces, including a Messages tab for app-user conversation, and a Home tab that can be fully customized by the app. ### Slack App Configuration @@ -24,10 +24,10 @@ To enable Events API, go to **Features** > **Event Subscriptions** on the left p All your app needs to do to provide Home tabs to your app users are: -1. Call the [**views.publish**](https://api.slack.com/methods/views.publish) method to update the Home tab on a per-user basis +1. Call the [**views.publish**](https://docs.slack.dev/reference/methods/views.publish) method to update the Home tab on a per-user basis 2. Handle any user interactions in Home tab (`"block_actions"`, `"block_suggestion"`) -Most commonly, [`"app_home_opened"`](https://api.slack.com/events/app_home_opened) events would be used as the trigger to call the [**views.publish**](https://api.slack.com/methods/views.publish) method. Subscribing this event type is useful particularly for the initial Home tab creation. But it's also fine to publish Home tabs by any other means. +Most commonly, [`"app_home_opened"`](https://docs.slack.dev/reference/events/app_home_opened) events would be used as the trigger to call the [**views.publish**](https://docs.slack.dev/reference/methods/views.publish) method. Subscribing this event type is useful particularly for the initial Home tab creation. But it's also fine to publish Home tabs by any other means. --- ## Examples @@ -38,7 +38,7 @@ If you're a beginner to using Bolt for Slack App development, consult [Getting S ::: -The following code calls [**views.publish**](https://api.slack.com/methods/views.publish) method when receiving an [`"app_home_opened"` events](https://api.slack.com/events/app_home_opened) for the user that triggered the event. The user will see the updated Home tab immediately after the [**views.publish**](https://api.slack.com/methods/views.publish) call has been successfully completed. +The following code calls [**views.publish**](https://docs.slack.dev/reference/methods/views.publish) method when receiving an [`"app_home_opened"` events](https://docs.slack.dev/reference/events/app_home_opened) for the user that triggered the event. The user will see the updated Home tab immediately after the [**views.publish**](https://docs.slack.dev/reference/methods/views.publish) call has been successfully completed. ```java import com.slack.api.methods.response.views.ViewsPublishResponse; @@ -50,7 +50,7 @@ import static com.slack.api.model.block.Blocks.*; import static com.slack.api.model.block.composition.BlockCompositions.*; import static com.slack.api.model.view.Views.*; -// https://api.slack.com/events/app_home_opened +// https://docs.slack.dev/reference/events/app_home_opened app.event(AppHomeOpenedEvent.class, (payload, ctx) -> { // Build a Home tab view ZonedDateTime now = ZonedDateTime.now(); @@ -89,7 +89,7 @@ import com.slack.api.model.view.Views.* import com.slack.api.model.event.AppHomeOpenedEvent import java.time.ZonedDateTime -// https://api.slack.com/events/app_home_opened +// https://docs.slack.dev/reference/events/app_home_opened app.event(AppHomeOpenedEvent::class.java) { event, ctx -> // Build a Home tab view val now = ZonedDateTime.now() diff --git a/docs/content/guides/audit-logs-api.md b/docs/content/guides/audit-logs-api.md index e07a8b199..153a15034 100644 --- a/docs/content/guides/audit-logs-api.md +++ b/docs/content/guides/audit-logs-api.md @@ -4,11 +4,11 @@ lang: en # Audit Logs API -[Audit Logs API](https://api.slack.com/docs/audit-logs-api) is a set of APIs for monitoring what's happening in your [Enterprise Grid](https://api.slack.com/enterprise/grid) organization. +[Audit Logs API](https://api.lack.com/docs/audit-logs-api) is a set of APIs for monitoring what's happening in your [Enterprise Grid](https://docs.slack.dev/enterprise-grid/) organization. The Audit Logs API can be used by security information and event management (SIEM) tools to provide an analysis of how your Slack organization is being accessed. You can also use this API to write your own applications to see how members of your organization are using Slack. -Follow the instructions in [the API document](https://api.slack.com/docs/audit-logs-api) to get a valid token for using Audit Logs API. Your Slack app for Audit Logs API needs to be installed on the Enterprise Grid Organization, not an individual workspace within the organization. +Follow the instructions in [the API document](https://docs.slack.dev/admins/audit-logs-api) to get a valid token for using Audit Logs API. Your Slack app for Audit Logs API needs to be installed on the Enterprise Grid Organization, not an individual workspace within the organization. --- ## Call Audit Logs API in Java @@ -76,7 +76,7 @@ Refer to [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/ --- ## Rate Limits -The Audit Logs API methods conform to Slack's [rate limits](https://api.slack.com/docs/rate-limits) and all methods are rated Tier 3. This allows for up to 50 calls per minute, with an allowance for sporadic bursts. Refer to [the API document](https://api.slack.com/admins/audit-logs#how_to_call_the_audit_logs_api) for more details. +The Audit Logs API methods conform to Slack's [rate limits](https://docs.slack.dev/apis/web-api/rate-limits) and all methods are rated Tier 3. This allows for up to 50 calls per minute, with an allowance for sporadic bursts. Refer to [the API document](https://docs.slack.dev/admins/audit-logs-api) for more details. `AsyncAuditClient`, the async client, has great consideration for Rate Limits. diff --git a/docs/content/guides/bolt-basics.md b/docs/content/guides/bolt-basics.md index 2a9e22147..60432a197 100644 --- a/docs/content/guides/bolt-basics.md +++ b/docs/content/guides/bolt-basics.md @@ -6,7 +6,7 @@ lang: en **Bolt for Java** is a framework on the JVM that offers an abstraction layer to build Slack apps quickly using modern platform features. -If you're not yet familiar with Slack app development in general, we recommend reading the [Slack API docs](https://api.slack.com/docs). +If you're not yet familiar with Slack app development in general, we recommend reading the [Slack API docs](https://docs.slack.dev). --- ## Start with the App class @@ -78,7 +78,7 @@ app.command("/ping", (req, ctx) -> { }); ``` -It's also possible to use [Block Kit](https://api.slack.com/block-kit) to make messages more interactive. +It's also possible to use [Block Kit](https://docs.slack.dev/block-kit/) to make messages more interactive. ```java import static com.slack.api.model.block.Blocks.*; @@ -132,7 +132,7 @@ If you want to take full control of the `ExecutorService` to use, you don't need --- ## Respond to User Actions -Are you already familiar with `response_url`? If not, we recommend reading [this guide](https://api.slack.com/interactivity/handling#message_responses) first. +Are you already familiar with `response_url`? If not, we recommend reading [this guide](https://docs.slack.dev/interactivity/handling-user-interaction) first. As the guide says, some of the user interaction payloads may contain a `response_url`. This `response_url` is unique to each payload, and can be used to publish messages back to the place where the interaction happened. @@ -167,7 +167,7 @@ app.command("/hello", (req, ctx) -> { }); ``` -For [chat.postMessage](https://api.slack.com/methods/chat.postMessage) API calls with the given channel ID, using `say()` utility is much simpler. If your slash command needs to be available anywhere, using `ctx.respond` would be more robust as `say()` method does not work for the conversations where the app's bot user is not a member of (e.g., a person's own DM). +For [chat.postMessage](https://docs.slack.dev/reference/methods/chat.postmessage) API calls with the given channel ID, using `say()` utility is much simpler. If your slash command needs to be available anywhere, using `ctx.respond` would be more robust as `say()` method does not work for the conversations where the app's bot user is not a member of (e.g., a person's own DM). ```java app.command("/hello", (req, ctx) -> { diff --git a/docs/content/guides/composing-messages.md b/docs/content/guides/composing-messages.md index 853026628..7edc66858 100644 --- a/docs/content/guides/composing-messages.md +++ b/docs/content/guides/composing-messages.md @@ -4,9 +4,9 @@ lang: en # Composing Messages -This section shows how to build Slack messages using the `slack-api-client` library. If you're not familiar with [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) API yet, read [the web api basics page](/guides/web-api-basics) before trying the samples here. +This section shows how to build Slack messages using the `slack-api-client` library. If you're not familiar with [`chat.postMessage`](https://docs.slack.dev/reference/methods/chat.postmessage) API yet, read [the web api basics page](/guides/web-api-basics) before trying the samples here. -Also, before jumping into Java code, we recommend developing an understanding of composing Slack messages. [Read the API documentation](https://api.slack.com/messaging/composing) for more information. +Also, before jumping into Java code, we recommend developing an understanding of composing Slack messages. [Read the API documentation](https://docs.slack.dev/messaging/) for more information. --- ## Text Formatting @@ -29,12 +29,12 @@ ChatPostMessageResponse response = slack.methods(token).chatPostMessage(req -> r ); ``` -As you see, using `text` is fairly simple. The only thing to know is to give a string value with a valid format. Consult [Basic formatting with `mrkdwn`](https://api.slack.com/reference/surfaces/formatting#basics) for understanding the markup language. +As you see, using `text` is fairly simple. The only thing to know is to give a string value with a valid format. Consult [Basic formatting with `mrkdwn`](https://docs.slack.dev/messaging/formatting-message-text) for understanding the markup language. --- ## Building Blocks for Rich Message Layouts -[Block Kit](https://api.slack.com/block-kit) is a UI framework for Slack apps that offers a balance of control and flexibility when building experiences in messages and other [surfaces](https://api.slack.com/surfaces). +[Block Kit](https://docs.slack.dev/block-kit/) is a UI framework for Slack apps that offers a balance of control and flexibility when building experiences in messages and other [surfaces](https://docs.slack.dev/surfaces/). It may not be so easy to compose a large JSON data structure in Java code. So, we offer setter methods like `blocksAsString(String)` that accept a whole `blocks` part as a single string value. Such method is supposed to be used with loaded external file data or outcomes by template engines. diff --git a/docs/content/guides/events-api.md b/docs/content/guides/events-api.md index 6653d2267..2c0f4f091 100644 --- a/docs/content/guides/events-api.md +++ b/docs/content/guides/events-api.md @@ -4,7 +4,7 @@ lang: en # Events -The [Events API](https://api.slack.com/events-api) is a streamlined way to build apps and bots that respond to activities in Slack. All you need is a Slack app and a secure place for us to send your events. +The [Events API](https://docs.slack.dev/apis/events-api/) is a streamlined way to build apps and bots that respond to activities in Slack. All you need is a Slack app and a secure place for us to send your events. ### Slack App Configuration @@ -22,7 +22,7 @@ To enable Events API, visit the [Slack App configuration page](http://api.slack. All you need to do to handle Events API requests are: -1. [Verify requests](https://api.slack.com/docs/verifying-requests-from-slack) from Slack +1. [Verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack) from Slack 1. Parse the request body and check if the `type` in `event` is the one you'd like to handle 1. Whatever you want to do with the event data 1. Respond to the Slack API server with 200 OK as an acknowledgment @@ -40,11 +40,11 @@ If you're a beginner to using Bolt for Slack App development, consult [Getting S Bolt does many of the commonly required tasks for you. The steps you need to handle would be: -* Specify [the Java class](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/com/slack/api/model/event/Event.html) corresponding to `event.type` (and also `event.subtype` [when necessary](https://api.slack.com/events/message#message_subtypes)) to handle +* Specify [the Java class](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/com/slack/api/model/event/Event.html) corresponding to `event.type` (and also `event.subtype` [when necessary](https://docs.slack.dev/reference/events/message)) to handle * Whatever you want to do with the event data * Call `ack()` as an acknowledgment -In event payloads, `response_url` is not included as it's not a payload coming from direct user interactions. Also, it's not possible to post a message using `ctx.ack()` for the same reason. If an event you receive is a user interaction and you'd like to post a reply to the user at the conversation the event happened, call [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) method or other similar ones with `channel` in the event payload. +In event payloads, `response_url` is not included as it's not a payload coming from direct user interactions. Also, it's not possible to post a message using `ctx.ack()` for the same reason. If an event you receive is a user interaction and you'd like to post a reply to the user at the conversation the event happened, call [**chat.postMessage**](https://docs.slack.dev/reference/methods/chat.postmessage) method or other similar ones with `channel` in the event payload. ```java import com.slack.api.methods.response.chat.ChatPostMessageResponse; @@ -154,7 +154,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Verify requests from Slack - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // This needs "X-Slack-Signature" header, "X-Slack-Request-Timestamp" header, and raw request body if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/content/guides/getting-started-with-bolt.md b/docs/content/guides/getting-started-with-bolt.md index e1d9c3c44..7bed83bc7 100644 --- a/docs/content/guides/getting-started-with-bolt.md +++ b/docs/content/guides/getting-started-with-bolt.md @@ -9,7 +9,7 @@ title: Getting Started This guide explains how to start your first-ever Bolt app. -If you're not yet familiar with Slack app development in general, we recommend reading the [Slack API docs](https://api.slack.com/docs). +If you're not yet familiar with Slack app development in general, we recommend reading the [Slack API docs](https://docs.slack.dev). --- ## Setting up your project {#project-setup} @@ -26,7 +26,7 @@ import TabItem from '@theme/TabItem'; -To enable [Socket Mode](https://api.slack.com/apis/connections/socket), the `bolt-socket-mode` library and its provided-scope dependencies are also required for your app. +To enable [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode), the `bolt-socket-mode` library and its provided-scope dependencies are also required for your app. ```xml @@ -159,7 +159,7 @@ dependencies { **Using `bolt-socket-mode`** -`bolt-socket-mode` is a handy way to start your [Socket Mode](https://api.slack.com/apis/connections/socket) app. It allows developers to build a Slack app backend service by writing only a main method initializes `App` and establishes a WebSocket connection to the Socket Mode servers. +`bolt-socket-mode` is a handy way to start your [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode) app. It allows developers to build a Slack app backend service by writing only a main method initializes `App` and establishes a WebSocket connection to the Socket Mode servers. @@ -331,8 +331,8 @@ The default constructor expects the following two env variables exist when start |Env Variable|Description| |-|-| -|`SLACK_BOT_TOKEN`|The valid bot token value starting with `xoxb-` in your development workspace. To issue a bot token, you need to install your Slack App that has a bot user to your development workspace. Visit the [Slack App configuration page](http://api.slack.com/apps), choose the app you're working on, and go to **Settings** > **Install App** on the left pane (Add [`app_mentions:read`](https://api.slack.com/scopes/app_mentions:read) bot scope if you see the message saying "Please add at least one feature or permission scope to install your app.").

If you run an app that is installable for multiple workspaces, no need to specify this. Consult [App Distribution (OAuth)](/guides/app-distribution) for further information instead.| -|`SLACK_SIGNING_SECRET`|The secret value shared only with the Slack Platform. It is used for verifying incoming requests from Slack. Request verification is crucial for security as Slack apps have internet-facing endpoints. To know the value, visit the [Slack App configuration page](http://api.slack.com/apps), choose the app you're working on, go to **Settings** > **Basic Information** on the left pane, and find **App Credentials** > **Signing Secret** on the page. Refer to [the document](https://api.slack.com/docs/verifying-requests-from-slack) for further information.| +|`SLACK_BOT_TOKEN`|The valid bot token value starting with `xoxb-` in your development workspace. To issue a bot token, you need to install your Slack App that has a bot user to your development workspace. Visit the [Slack App configuration page](http://api.slack.com/apps), choose the app you're working on, and go to **Settings** > **Install App** on the left pane (Add [`app_mentions:read`](https://docs.slack.dev/reference/scopes/app_mentions.read) bot scope if you see the message saying "Please add at least one feature or permission scope to install your app.").

If you run an app that is installable for multiple workspaces, no need to specify this. Consult [App Distribution (OAuth)](/guides/app-distribution) for further information instead.| +|`SLACK_SIGNING_SECRET`|The secret value shared only with the Slack Platform. It is used for verifying incoming requests from Slack. Request verification is crucial for security as Slack apps have internet-facing endpoints. To know the value, visit the [Slack App configuration page](http://api.slack.com/apps), choose the app you're working on, go to **Settings** > **Basic Information** on the left pane, and find **App Credentials** > **Signing Secret** on the page. Refer to [the document](https://docs.slack.dev/authentication/verifying-requests-from-slack) for further information.| If you prefer configuring an `App` in a different way, write some code to initialize `AppConfig` on your own. @@ -366,8 +366,8 @@ If you get stuck, go through the following checklist: * ✅ Gradle installed (if not, run `brew install gradle` for macOS / visit [their website](https://gradle.org/) for others) * ✅ `build.gradle` has `bolt-socket-mode` and `tyrus-standalone-client` in the dependencies and valid application plugin settings * ✅ `src/main/java/hello/MyApp.java` with a class having its main method -* ✅ [Create a Slack App](https://api.slack.com/apps?new_app=1), add [`commands`](https://api.slack.com/scopes/commands) bot scope, add **an app-level token with `connections:write` scope**, and install the app to your development workspace -* ✅ Copy [**Bot User OAuth Access Token**](https://api.slack.com/docs/token-types#bot) and [**App-Level Token**](https://api.slack.com/docs/token-types#app) from [your Slack App admin pages](https://api.slack.com/apps) and set them to env variables +* ✅ [Create a Slack App](https://api.slack.com/apps?new_app=1), add [`commands`](https://docs.slack.dev/reference/scopes/commands) bot scope, add **an app-level token with `connections:write` scope**, and install the app to your development workspace +* ✅ Copy [**Bot User OAuth Access Token**](https://docs.slack.dev/authentication/tokens#bot) and [**App-Level Token**](https://docs.slack.dev/authentication/tokens#app-level) from [your Slack App admin pages](https://api.slack.com/apps) and set them to env variables
@@ -376,8 +376,8 @@ If you get stuck, go through the following checklist: * ✅ Gradle installed (if not, run `brew install gradle` for macOS / visit [their website](https://gradle.org/) for others) * ✅ `build.gradle` has `bolt-jetty` dependency and valid application plugin settings * ✅ `src/main/java/hello/MyApp.java` with a class having its main method -* ✅ [Create a Slack App](https://api.slack.com/apps?new_app=1), add [`app_mentions:read`](https://api.slack.com/scopes/app_mentions:read) bot scope, install the app to your development workspace -* ✅ Copy [**Bot User OAuth Access Token**](https://api.slack.com/docs/token-types#bot) and [**Signing Secret**](https://api.slack.com/docs/verifying-requests-from-slack) from [your Slack App admin pages](https://api.slack.com/apps) and set them to env variables +* ✅ [Create a Slack App](https://api.slack.com/apps?new_app=1), add [`app_mentions:read`](https://docs.slack.dev/reference/scopes/app_mentions.read) bot scope, install the app to your development workspace +* ✅ Copy [**Bot User OAuth Access Token**](https://docs.slack.dev/authentication/tokens#bot) and [**Signing Secret**](https://docs.slack.dev/authentication/verifying-requests-from-slack) from [your Slack App admin pages](https://api.slack.com/apps) and set them to env variables
diff --git a/docs/content/guides/incoming-webhooks.md b/docs/content/guides/incoming-webhooks.md index ede435783..8b6842422 100644 --- a/docs/content/guides/incoming-webhooks.md +++ b/docs/content/guides/incoming-webhooks.md @@ -4,7 +4,7 @@ lang: en # Incoming Webhooks -[Incoming Webhooks](https://api.slack.com/messaging/webhooks) is a simple way to post messages from apps into Slack. Creating an Incoming Webhook gives you a unique URL to which you send a JSON payload with the message and some options. +[Incoming Webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks) is a simple way to post messages from apps into Slack. Creating an Incoming Webhook gives you a unique URL to which you send a JSON payload with the message and some options. ### Slack App Configuration diff --git a/docs/content/guides/interactive-components.md b/docs/content/guides/interactive-components.md index 00169ba68..7dd83f424 100644 --- a/docs/content/guides/interactive-components.md +++ b/docs/content/guides/interactive-components.md @@ -4,9 +4,9 @@ lang: en # Interactive Components -[Interactive components](https://api.slack.com/reference/block-kit/interactive-components) are a subset of [Block Kit](https://api.slack.com/block-kit) elements that add interactivity to various [surfaces](https://api.slack.com/surfaces). Interactions on blocks may happen not only in messages but also on [Modals](/guides/modals), and [Home tabs](/guides/app-home). +[Interactive components](https://docs.slack.dev/block-kit/#making-things-interactive) are a subset of [Block Kit](https://docs.slack.dev/block-kit/) elements that add interactivity to various [surfaces](https://docs.slack.dev/surfaces/). Interactions on blocks may happen not only in messages but also on [Modals](/guides/modals), and [Home tabs](/guides/app-home). -Reading [Composing Messages](/guides/composing-messages) is helpful to learn how to build [Block Kit](https://api.slack.com/block-kit) messages with this SDK. +Reading [Composing Messages](/guides/composing-messages) is helpful to learn how to build [Block Kit](https://docs.slack.dev/surfaces/) messages with this SDK. ### Slack App Configuration @@ -20,7 +20,7 @@ To enable Interactive Components, visit the [Slack App configuration page](http: All your app needs to do to handle Slack requests by user interactions are: -1. [Verify requests](https://api.slack.com/docs/verifying-requests-from-slack) from Slack +1. [Verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack) from Slack 1. Parse the request body and check if the `action_id` in a block is the one you'd like to handle 1. Build a reply message or surface to interact with the user further 1. Respond to the Slack API server with 200 OK as an acknowledgment @@ -84,7 +84,7 @@ app.blockAction("button-action") { req, ctx -> } ``` -Here is another example. This is a [select menu using external data source](https://api.slack.com/reference/block-kit/block-elements#external_select). +Here is another example. This is a [select menu using external data source](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#external_multi_select). ```javascript { @@ -173,7 +173,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Verify requests from Slack - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // This needs "X-Slack-Signature" header, "X-Slack-Request-Timestamp" header, and raw request body if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/content/guides/modals.md b/docs/content/guides/modals.md index 1d86db4e3..613e9883c 100644 --- a/docs/content/guides/modals.md +++ b/docs/content/guides/modals.md @@ -4,7 +4,7 @@ lang: en # Modals -[Modals](https://api.slack.com/surfaces/modals/using) are a focused surface to collect data from users or display dynamic and interactive information. To users, modals appear as focused surfaces inside of Slack enabling brief, yet deep interactions with apps. Modals can be assembled using the visual and interactive components found in [Block Kit](https://api.slack.com/block-kit). +[Modals](https://docs.slack.dev/surfaces/modals) are a focused surface to collect data from users or display dynamic and interactive information. To users, modals appear as focused surfaces inside of Slack enabling brief, yet deep interactions with apps. Modals can be assembled using the visual and interactive components found in [Block Kit](https://docs.slack.dev/block-kit/). ## Slack App Configuration @@ -20,18 +20,18 @@ There are three patterns to handle on modals. As always, your app has to respond ### `"block_actions"` requests -When someone uses an [interactive component](https://api.slack.com/reference/block-kit/interactive-components) in your app's modal views, the app will receive a [block_actions payload](https://api.slack.com/reference/interaction-payloads/block-actions). All you need to do to handle the `"block_actions"` requests are: +When someone uses an [interactive component](https://docs.slack.dev/block-kit/#making-things-interactive) in your app's modal views, the app will receive a [block_actions payload](https://docs.slack.dev/reference/interaction-payloads/block_actions-payload). All you need to do to handle the `"block_actions"` requests are: -1. [Verify requests](https://api.slack.com/docs/verifying-requests-from-slack) from Slack +1. [Verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack) from Slack 1. Parse the request body, and check if the `type` is `"block_actions"` and the `action_id` in a block is the one you'd like to handle -1. [Modify/push a view via API](https://api.slack.com/surfaces/modals/using#modifying) and/or update the modal to hold the sent data as [private_metadata](https://api.slack.com/surfaces/modals/using#carrying_data_between_views) +1. [Modify/push a view via API](https://docs.slack.dev/surfaces/modals#interactions) and/or update the modal to hold the sent data as [private_metadata](https://docs.slack.dev/surfaces/modals#private_metadata) 1. Respond to the Slack API server with 200 OK as an acknowledgment ### `"view_submission"` requests -When a modal view is submitted, you'll receive a [view_submission payload](https://api.slack.com/reference/interaction-payloads/views#view_submission). All you need to do to handle the `"view_submission"` requests are: +When a modal view is submitted, you'll receive a [view_submission payload](https://docs.slack.dev/reference/interaction-payloads/view-interactions-payload#view_submission). All you need to do to handle the `"view_submission"` requests are: -1. [Verify requests](https://api.slack.com/docs/verifying-requests-from-slack) from Slack +1. [Verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack) from Slack 1. Parse the request body, and check if the `type` is `"view_submission"` and the `callback_id` is the one you'd like to handle 1. Extract the form data from `view.state.values` 1. Do whatever to do such as input validations, storing them in a database, talking to external services @@ -41,9 +41,9 @@ When a modal view is submitted, you'll receive a [view_submission payload](https ### `"view_closed"` requests (only when `notify_on_close` is `true`) -Your app can optionally receive [view_closed payloads](https://api.slack.com/reference/interaction-payloads/views#view_closed) whenever a user clicks on the Cancel or x buttons. These buttons are standard, not blocks, in all app modals. To receive the `"view_closed"` payload when this happens, set `notify_on_close` to `true` when creating a view with [views.open](https://api.slack.com/methods/views.open) and [views.push](https://api.slack.com/methods/views.push) methods. +Your app can optionally receive [view_closed payloads](https://docs.slack.dev/reference/interaction-payloads/view-interactions-payload#view_closed) whenever a user clicks on the Cancel or x buttons. These buttons are standard, not blocks, in all app modals. To receive the `"view_closed"` payload when this happens, set `notify_on_close` to `true` when creating a view with [views.open](https://docs.slack.dev/reference/methods/views.open) and [views.push](https://docs.slack.dev/reference/methods/views.push) methods. All you need to do to handle the `"view_closed"` requests are: -1. [Verify requests](https://api.slack.com/docs/verifying-requests-from-slack) from Slack +1. [Verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack) from Slack 1. Parse the request body, and check if the `type` is `"view_closed"` and the `callback_id` is the one you'd like to handle 1. Do whatever to do at the timing 1. Respond with 200 OK as the acknowledgment @@ -57,7 +57,7 @@ In general, there are a few things to know when working with modals. They would * You use `callback_id` to identify a modal, a pair of `block_id` and `action_id` to identify each input in `view.state.values` * You can use `view.private_metadata` to hold the internal state and/or `"block_actions"` results on the modal * You respond to `"view_submission"` requests with `response_action` to determine the next state of a modal -* [views.update](https://api.slack.com/methods/views.update) and [views.push](https://api.slack.com/methods/views.push) API methods are supposed to be used when receiving `"block_actions"` requests in modals, NOT for `"view_submission"` requests +* [views.update](https://docs.slack.dev/reference/methods/views.update) and [views.push](https://docs.slack.dev/reference/methods/views.push) API methods are supposed to be used when receiving `"block_actions"` requests in modals, NOT for `"view_submission"` requests --- @@ -421,9 +421,9 @@ ctx.ack { it.responseAction("push").view(newViewInStack) } `view_submission` payloads don't have `response_url` by default. However, if you have an `input` block asking users a channel to post a message, payloads may provide `response_urls` (`List responseUrls` in Java). -To enable this, set the block element type as either [`channels_select`](https://api.slack.com/reference/block-kit/block-elements#channel_select) or [`conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_select) and add `"response_url_enabled": true`. Refer to [the API document](https://api.slack.com/surfaces/modals/using#modal_response_url) for details. +To enable this, set the block element type as either [`channels_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element/#channel_multi_select) or [`conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element/#conversation_multi_select) and add `"response_url_enabled": true`. Refer to [the API document](https://docs.slack.dev/surfaces/modals#modal_response_url) for details. -Also, if you want to automatically set the channel a user is viewing when opening a modal to`initial_conversation(s)`, turn `default_to_current_conversation` on in [`conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_select) / [`multi_conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_multi_select) elements. +Also, if you want to automatically set the channel a user is viewing when opening a modal to`initial_conversation(s)`, turn `default_to_current_conversation` on in [`conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element/#conversation_multi_select) / [`multi_conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element) elements. ```java import static com.slack.api.model.block.Blocks.*; @@ -493,7 +493,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Verify requests from Slack - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // This needs "X-Slack-Signature" header, "X-Slack-Request-Timestamp" header, and raw request body if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/content/guides/rtm.md b/docs/content/guides/rtm.md index 07dc14bcb..0a574d44b 100644 --- a/docs/content/guides/rtm.md +++ b/docs/content/guides/rtm.md @@ -14,7 +14,7 @@ We recommend using the [Events API](/guides/events-api) and [Web API](/guides/we ## Prerequisites -[The Real Time Messaging API](https://api.slack.com/rtm) is a WebSocket-based API that allows you to receive events from Slack in real-time and send messages as users. +[The Real Time Messaging API](https://docs.slack.dev/legacy/legacy-rtm-api) is a WebSocket-based API that allows you to receive events from Slack in real-time and send messages as users. To use the RTM Client, in addition to the `slack-api-client` library, `javax.websocket-api` and `tyrus-standalone-client (1.x)` are required. Here is a minimum Maven settings file. diff --git a/docs/content/guides/scim-api.md b/docs/content/guides/scim-api.md index 84af3d300..383a24de1 100644 --- a/docs/content/guides/scim-api.md +++ b/docs/content/guides/scim-api.md @@ -4,11 +4,11 @@ lang: en # SCIM API -[SCIM API](https://api.slack.com/scim) is a set of APIs for provisioning and managing user accounts and groups. SCIM is used by Single Sign-On (SSO) services and identity providers to manage people across a variety of tools, including Slack. +[SCIM API](https://docs.slack.dev/admins/scim-api) is a set of APIs for provisioning and managing user accounts and groups. SCIM is used by Single Sign-On (SSO) services and identity providers to manage people across a variety of tools, including Slack. [SCIM (System for Cross-domain Identity Management)](http://www.simplecloud.info/) is supported by myriad services. It behaves slightly differently than other Slack APIs. -Refer to [the API document](https://api.slack.com/scim) for more details. +Refer to [the API document](https://docs.slack.dev/admins/scim-api) for more details. --- ## Call SCIM API in Java @@ -58,7 +58,7 @@ newUser.getName().setFamilyName("Sera"); UsersCreateResponse creation = slack.scim(token).createUser(req -> req.user(newUser)); // Run a filter query for user search -// https://api.slack.com/scim#filter +// https://docs.slack.dev/admins/scim-api UsersSearchResponse searchResp = slack.scim(token).searchUsers(req -> req .count(1) .filter("userName eq \"" + userName + "\"") @@ -122,7 +122,7 @@ try { --- ## Rate Limits -Slack uses rate limits for the SCIM API to help provide a predictably pleasant experience. Please note: unlike many of the other Slack API rate limits, the limits below apply to all SCIM apps in an org, not on a per-app basis. Refer to [the API document](https://api.slack.com/admins/scim#ratelimits) for more details. +Slack uses rate limits for the SCIM API to help provide a predictably pleasant experience. Please note: unlike many of the other Slack API rate limits, the limits below apply to all SCIM apps in an org, not on a per-app basis. Refer to [the API document](https://docs.slack.dev/admins/scim-api#limitations) for more details. `AsyncSCIMClient`, the async client, has great consideration for Rate Limits. diff --git a/docs/content/guides/shortcuts.md b/docs/content/guides/shortcuts.md index ce2d9cedb..8cc99c78f 100644 --- a/docs/content/guides/shortcuts.md +++ b/docs/content/guides/shortcuts.md @@ -6,7 +6,7 @@ lang: en # Shortcuts -**Shortcuts** are simple entry points for users to invoke your app. [**Global shortcuts**](https://api.slack.com/interactivity/shortcuts/using#global_shortcuts) are surfaced from within search in Slack, while [**message shortcuts**](https://api.slack.com/interactivity/shortcuts/using#message_shortcuts) are surfaced in the message context menu. +**Shortcuts** are simple entry points for users to invoke your app. [**Global shortcuts**](https://docs.slack.dev/interactivity/implementing-shortcuts#global) are surfaced from within search in Slack, while [**message shortcuts**](https://docs.slack.dev/interactivity/implementing-shortcuts#messages) are surfaced in the message context menu. Your app has 3 seconds to call `ack()`, which acknowledges a shortcut request is received from Slack. @@ -29,7 +29,7 @@ The specified **Callback ID** will be sent as `callback_id` in payloads from Sla All your app needs to do to handle shortcuts requests are: -1. [Verify requests](https://api.slack.com/docs/verifying-requests-from-slack) from Slack +1. [Verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack) from Slack 1. Parse the request body and check if the `callback_id` is the one you'd like to handle 1. Build a reply message or do whatever you want to do 1. Respond to the Slack API server with 200 OK as an acknowledgment @@ -51,7 +51,7 @@ Bolt does many of the commonly required tasks for you. The steps you need to han Message shortcut request payloads have `response_url`, so that your app can reply to the shortcut (even asynchronously after the acknowledgment). The URL is usable up to 5 times within 30 minutes of the shortcut invocation. If you post a message using `response_url`, call `ctx.ack()` without arguments and use `ctx.respond()` to post a message. -Global shortcut request payloads don't have `response_url` by default. If you have an `input` block asking users a channel to post a message, global shortcut request payloads may provide `response_urls`. To enable this, set the block element type as either [`channels_select`](https://api.slack.com/reference/block-kit/block-elements#channel_select) or [`conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_select) and add `"response_url_enabled": true`. +Global shortcut request payloads don't have `response_url` by default. If you have an `input` block asking users a channel to post a message, global shortcut request payloads may provide `response_urls`. To enable this, set the block element type as either [`channels_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#channel_multi_select) or [`conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#conversation_multi_select) and add `"response_url_enabled": true`. Here is a tiny example demonstrating how to handle shortcut requests in a Bolt app. @@ -142,7 +142,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Verify requests from Slack - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // This needs "X-Slack-Signature" header, "X-Slack-Request-Timestamp" header, and raw request body if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/content/guides/sign-in-with-slack.md b/docs/content/guides/sign-in-with-slack.md index dc8052c07..928241120 100644 --- a/docs/content/guides/sign-in-with-slack.md +++ b/docs/content/guides/sign-in-with-slack.md @@ -4,7 +4,7 @@ lang: en # Sign in with Slack (OpenID Connect) -[Sign in with Slack](https://api.slack.com/authentication/sign-in-with-slack) helps users log into your service using their Slack profile. The platform feature was recently upgraded to be compatible with the standard [OpenID Connect](https://openid.net/connect/) specification. With Bolt for Java v1.10 or higher, implementing the auth flow is much easier. +[Sign in with Slack](https://docs.slack.dev/authentication/sign-in-with-slack/) helps users log into your service using their Slack profile. The platform feature was recently upgraded to be compatible with the standard [OpenID Connect](https://openid.net/connect/) specification. With Bolt for Java v1.10 or higher, implementing the auth flow is much easier. ## Slack App Configuration @@ -94,7 +94,7 @@ SlackAppServer server = new SlackAppServer(apps); server.start(); ``` -If you enable [the token rotation](https://api.slack.com/authentication/rotation) along with the OpenID Connect, the code can be like this: +If you enable [the token rotation](https://docs.slack.dev/authentication/using-token-rotation) along with the OpenID Connect, the code can be like this: ```java // You can handle the OpenID Connect code authorization flow with this callback function diff --git a/docs/content/guides/slash-commands.md b/docs/content/guides/slash-commands.md index c4dedfdf8..ddcb00e82 100644 --- a/docs/content/guides/slash-commands.md +++ b/docs/content/guides/slash-commands.md @@ -4,7 +4,7 @@ lang: en # Slash Commands -[Slash Commands](https://api.slack.com/interactivity/slash-commands) allow users to invoke your app from the message composer box. +[Slash Commands](https://docs.slack.dev/interactivity/implementing-slash-commands) allow users to invoke your app from the message composer box. Responding to slash command invocations is a common use case. Your app has to respond to the request within 3 seconds by `ack()` method. Otherwise, the user will see the timeout error on Slack. @@ -23,7 +23,7 @@ To enable slash commands, visit the [Slack App configuration page](http://api.sl All your app needs to do to handle slash command requests are: -1. [Verify requests](https://api.slack.com/docs/verifying-requests-from-slack) from Slack +1. [Verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack) from Slack 1. Parse the request body and check if the `command` is the one you'd like to handle 1. Build a reply message or do whatever you want to do 1. Respond to the Slack API server with 200 OK as an acknowledgment @@ -87,7 +87,7 @@ app.command("/echo") { req, ctx -> } ``` -To learn how to build [Block Kit](https://api.slack.com/block-kit) messages with this SDK, consult [Composing Messages](/guides/composing-messages). +To learn how to build [Block Kit](https://docs.slack.dev/block-kit/) messages with this SDK, consult [Composing Messages](/guides/composing-messages). ### Under the Hood @@ -102,7 +102,7 @@ import com.slack.api.app_backend.slash_commands.payload.SlashCommandPayload; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Verify requests from Slack - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // This needs "X-Slack-Signature" header, "X-Slack-Request-Timestamp" header, and raw request body if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/content/guides/socket-mode.md b/docs/content/guides/socket-mode.md index ecd133f78..0a412b391 100644 --- a/docs/content/guides/socket-mode.md +++ b/docs/content/guides/socket-mode.md @@ -4,14 +4,14 @@ lang: en # Socket Mode -With [Socket Mode](https://api.slack.com/apis/connections/socket), instead of creating a server with endpoints that Slack sends payloads to, the app will instead connect to Slack via a WebSocket connection and receive data from Slack over the socket connection. In this SDK, `bolt-socket-mode`, a Bolt framework extension for building Socket Mode enabled apps, is available since version 1.5. +With [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode), instead of creating a server with endpoints that Slack sends payloads to, the app will instead connect to Slack via a WebSocket connection and receive data from Slack over the socket connection. In this SDK, `bolt-socket-mode`, a Bolt framework extension for building Socket Mode enabled apps, is available since version 1.5. ## Slack App Configuration To enable Socket Mode, visit the [Slack App configuration page](http://api.slack.com/apps), choose the app you're working on, and go to **Settings** on the left pane. There are a few things to do on the page. * Go to **Settings** > **Basic Information** - * Add a new **App-Level Token** with the [`connections:write`](https://api.slack.com/scopes/connections:write) scope + * Add a new **App-Level Token** with the [`connections:write`](https://docs.slack.dev/reference/scopes/connections.write) scope * Get the generated token value that starts with `xapp-` * Go to **Settings** > **Socket Mode** * Turn on **Enable Socket Mode** diff --git a/docs/content/guides/status-api.md b/docs/content/guides/status-api.md index 957ad2245..89e58bf91 100644 --- a/docs/content/guides/status-api.md +++ b/docs/content/guides/status-api.md @@ -4,7 +4,7 @@ lang: en # Status API -[The Slack Status API](https://api.slack.com/docs/slack-status) describes the health of the Slack product. When there's an incident, outage, or maintenance, the Slack Status API reflects all the information we have on the issue, including which features of Slack are affected and detailed updates over time. +[The Slack Status API](https://docs.slack.dev/reference/slack-status-api/) describes the health of the Slack product. When there's an incident, outage, or maintenance, the Slack Status API reflects all the information we have on the issue, including which features of Slack are affected and detailed updates over time. ## Status API in Java diff --git a/docs/content/guides/steps-from-apps.md b/docs/content/guides/steps-from-apps.md index 2b32e645a..82cc377cb 100644 --- a/docs/content/guides/steps-from-apps.md +++ b/docs/content/guides/steps-from-apps.md @@ -8,13 +8,13 @@ lang: en Steps from Apps is a deprecated feature. -Steps from Apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom steps for Bolt](https://api.slack.com/automation/functions/custom-bolt). +Steps from Apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://docs.slack.dev/workflows/), such as [custom steps for Bolt](https://docs.slack.dev/workflows/workflow-steps). -Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information. +Please [read the Slack API changelog entry](https://docs.slack.dev/changelog/2023-08-workflow-steps-from-apps-step-back) for more information. ::: -Steps from apps allow your app to create and process steps that users can add using [Workflow Builder](https://api.slack.com/workflows). +Steps from apps allow your app to create and process steps that users can add using [Workflow Builder](https://docs.slack.dev/workflows/workflow-builder). A step is made up of three distinct user events: @@ -24,7 +24,7 @@ A step is made up of three distinct user events: All three events must be handled for a workflow step to function. -Read more about steps from apps in the [API documentation](https://api.slack.com/workflows/steps). +Read more about steps from apps in the [API documentation](https://docs.slack.dev/legacy/legacy-steps-from-apps/). ### Slack App Configuration @@ -66,13 +66,13 @@ app.step(step); --- ## Adding or editing steps from apps -When a builder adds (or later edits) your step in their workflow, your app will receive a [`workflow_step_edit`](https://api.slack.com/reference/workflows/workflow_step_edit) event. The `edit` callback in your `WorkflowStep` configuration will be run when this event is received. +When a builder adds (or later edits) your step in their workflow, your app will receive a [`workflow_step_edit`](https://docs.slack.dev/legacy/legacy-steps-from-apps/legacy-steps-from-apps-workflow_step_edit-payload) event. The `edit` callback in your `WorkflowStep` configuration will be run when this event is received. -Whether a builder is adding or editing a step, you need to send them a [step from app configuration modal](https://api.slack.com/reference/workflows/configuration-view). This modal is where step-specific settings are chosen, and it has more restrictions than typical modals—most notably, it cannot include `title`, `submit`, or `close` properties. By default, the configuration modal's `callback_id` will be the same as the workflow step. +Whether a builder is adding or editing a step, you need to send them a [step from app configuration modal](https://docs.slack.dev/legacy/legacy-steps-from-apps/legacy-steps-from-apps-configuration-view-object). This modal is where step-specific settings are chosen, and it has more restrictions than typical modals—most notably, it cannot include `title`, `submit`, or `close` properties. By default, the configuration modal's `callback_id` will be the same as the workflow step. Within the `edit` callback, the `configure()` utility can be used to easily open your step's configuration modal by passing in an object with your view's `blocks`. To disable saving the configuration before certain conditions are met, pass in `submit_disabled` with a value of `true`. -To learn more about opening configuration modals, [read the documentation](https://api.slack.com/workflows/steps#handle_config_view). +To learn more about opening configuration modals, [read the documentation](https://docs.slack.dev/legacy/legacy-steps-from-apps/). ```java import static com.slack.api.model.block.Blocks.*; @@ -121,7 +121,7 @@ Within the `save` callback, the `update()` method can be used to save the builde * `stepName` overrides the default Step name * `stepImageUrl` overrides the default Step image -To learn more about how to structure these parameters, [read the documentation](https://api.slack.com/reference/workflows/workflow_step). +To learn more about how to structure these parameters, [read the documentation](https://docs.slack.dev/legacy/legacy-steps-from-apps/). ```java import java.util.*; @@ -158,7 +158,7 @@ app.step(step); --- ## Executing steps from apps -When your workflow step is executed by an end user, your app will receive a [`workflow_step_execute`](https://api.slack.com/events/workflow_step_execute) event. The `execute` callback in your `WorkflowStep` configuration will be run when this event is received. +When your workflow step is executed by an end user, your app will receive a [`workflow_step_execute`](https://docs.slack.dev/reference/events/workflow_step_execute) event. The `execute` callback in your `WorkflowStep` configuration will be run when this event is received. Using the `inputs` from the `save` callback, this is where you can make third-party API calls, save information to a database, update the user's Home tab, or decide the outputs that will be available to subsequent steps from apps by mapping values to the `outputs` object. diff --git a/docs/content/guides/web-api-basics.md b/docs/content/guides/web-api-basics.md index 25b3d4b7e..276d4db49 100644 --- a/docs/content/guides/web-api-basics.md +++ b/docs/content/guides/web-api-basics.md @@ -25,26 +25,26 @@ Here is the list of the methods in a `Slack` object to create an API client. |Method|Return Type|Description| |-|-|-| -|`Slack#methods(String)`|`com.slack.api.methods.MethodsClient`|Creates a HTTP client for [API Methods](https://api.slack.com/methods)| -|`Slack#methodsAsync(String)`|`com.slack.api.methods.AsyncMethodsClient`|Creates an async HTTP client for [API Methods](https://api.slack.com/methods) with a great [Rate Limits](https://api.slack.com/docs/rate-limits) supports| -|`Slack#socketMode(String)`|`com.slack.api.socket_mode.SocketModeClient`|Creates a WebSocket client for [Socket Mode](https://api.slack.com/apis/connections/socket)| -|`Slack#rtm(String)`|`com.slack.api.rtm.RTMClient`|Creates a WebSocket client for [Real Time Messaging (RTM) API](https://api.slack.com/rtm)| -|`Slack#scim(String)`|`com.slack.api.scim.SCIMClient`|Creates a HTTP client for [SCIM API](https://api.slack.com/scim)| -|`Slack#audit(String)`|`com.slack.api.audit.AuditClient`|Creates a HTTP client for [Audit Logs API](https://api.slack.com/docs/audit-logs-api)| -|`Slack#status()`|`com.slack.api.status.v2.StatusClient`|Creates a HTTP client for [Slack Status API](https://api.slack.com/docs/slack-status)| +|`Slack#methods(String)`|`com.slack.api.methods.MethodsClient`|Creates a HTTP client for [API Methods](https://docs.slack.dev/reference/methods)| +|`Slack#methodsAsync(String)`|`com.slack.api.methods.AsyncMethodsClient`|Creates an async HTTP client for [API Methods](https://docs.slack.dev/reference/methods) with a great [Rate Limits](https://docs.slack.dev/apis/web-api/rate-limits) supports| +|`Slack#socketMode(String)`|`com.slack.api.socket_mode.SocketModeClient`|Creates a WebSocket client for [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode)| +|`Slack#rtm(String)`|`com.slack.api.rtm.RTMClient`|Creates a WebSocket client for [Real Time Messaging (RTM) API](https://docs.slack.dev/legacy/legacy-rtm-api)| +|`Slack#scim(String)`|`com.slack.api.scim.SCIMClient`|Creates a HTTP client for [SCIM API](https://docs.slack.dev/admins/scim-api)| +|`Slack#audit(String)`|`com.slack.api.audit.AuditClient`|Creates a HTTP client for [Audit Logs API](https://docs.slack.dev/admins/audit-logs-api)| +|`Slack#status()`|`com.slack.api.status.v2.StatusClient`|Creates a HTTP client for [Slack Status API](https://docs.slack.dev/reference/slack-status-api/)| :::tip -Are you looking for the [Incoming Webhooks](https://api.slack.com/messaging/webhooks)? Of course, it's also supported! Check [this guide](/guides/incoming-webhooks) for it. +Are you looking for the [Incoming Webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks)? Of course, it's also supported! Check [this guide](/guides/incoming-webhooks) for it. ::: --- ## Call a Method -The most popular Slack Web API method is called [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage), and it's used to send a message to a conversation. +The most popular Slack Web API method is called [`chat.postMessage`](https://docs.slack.dev/reference/methods/chat.postmessage), and it's used to send a message to a conversation. -To call a Web API method such as [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage), a `MethodsClient` instance needs to be initialized with a token. A token usually begins with `xoxb-` (bot token) or `xoxp-` (user token). You get them from each workspace that an app has been installed. [The Slack App configuration pages](https://api.slack.com/apps) help you get your first token for your development workspace. +To call a Web API method such as [`chat.postMessage`](https://docs.slack.dev/reference/methods/chat.postmessage), a `MethodsClient` instance needs to be initialized with a token. A token usually begins with `xoxb-` (bot token) or `xoxp-` (user token). You get them from each workspace that an app has been installed. [The Slack App configuration pages](https://api.slack.com/apps) help you get your first token for your development workspace. :::warning @@ -138,7 +138,7 @@ In addition, you can check out the [Block Kit Kotlin DSL](/guides/composing-mess ### Handle Responses -If you're not yet familiar with the Slack Web API response format, read the [Evaluating responses](https://api.slack.com/web#responses) guide to understand it. All Web API responses contain a JSON object, which always contains a top-level boolean property `"ok"`, indicating success or failure. +If you're not yet familiar with the Slack Web API response format, read the [Evaluating responses](https://docs.slack.dev/apis/web-api/#responses) guide to understand it. All Web API responses contain a JSON object, which always contains a top-level boolean property `"ok"`, indicating success or failure. ```json { @@ -171,11 +171,11 @@ if (response.isOk()) { When calling API methods, errors can occur for a variety of reasons: -1. Received a successful response but in its body, `"ok"` is `false` and an `"error"` such as `channel_not_found` exists. These errors correspond to their definitions on their [method page](https://api.slack.com/methods). +1. Received a successful response but in its body, `"ok"` is `false` and an `"error"` such as `channel_not_found` exists. These errors correspond to their definitions on their [method page](https://docs.slack.dev/reference/methods). 2. Got a `java.io.IOException` thrown due to connectivity issues 3. Got a `com.slack.api.methods.SlackApiException` thrown for an unsuccessful response -To understand how to handle `1.` pattern, read [this API document](https://api.slack.com/web#evaluating_responses). +To understand how to handle `1.` pattern, read [this API document](https://docs.slack.dev/apis/web-api/#responses). As for `2.` & `3.` patterns, the `MethodsClient` may throw two types of exceptions. Applications are responsible for catching and handling both of these exceptions. @@ -209,7 +209,7 @@ try { --- ## There's More! -Slack Web API offers [180+ methods](https://api.slack.com/methods). The way to use others is almost the same. Just calling methods in `MethodsClient` with a valid token and sufficient parameters works for you. +Slack Web API offers [180+ methods](https://docs.slack.dev/reference/methods). The way to use others is almost the same. Just calling methods in `MethodsClient` with a valid token and sufficient parameters works for you. A good way to check the entire list of methods available in this SDK is to access [the Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/com/slack/api/methods/MethodsClient.html). @@ -245,7 +245,7 @@ AwesomeMethodResponse response = slack.methods().postFormWithTokenAndParseRespon --- ## Rate Limits -Slack platform features and APIs rely on [rate limits](https://api.slack.com/docs/rate-limits) to help provide a predictably pleasant experience for users. The limits would be applied on a "per app per workspace" basis. There are several tiers to determine how frequently your apps can call Web APIs. `slack-api-client` has a complete support for those tiers and `AsyncMethodsClient`, the async client, has great consideration for Rate Limits. +Slack platform features and APIs rely on [rate limits](https://docs.slack.dev/apis/web-api/rate-limits) to help provide a predictably pleasant experience for users. The limits would be applied on a "per app per workspace" basis. There are several tiers to determine how frequently your apps can call Web APIs. `slack-api-client` has a complete support for those tiers and `AsyncMethodsClient`, the async client, has great consideration for Rate Limits. The async client internally has its queue systems to avoid burst traffics as much as possible while `MethodsClient`, the synchronous client, always blindly sends requests. The good thing is that both sync and async clients maintain the metrics data in a `MetricsDatastore` together. This allows the async client to accurately know the current traffic they generated toward the Slack Platform and estimate the remaining amount to call. diff --git a/docs/content/guides/web-api-for-admins.md b/docs/content/guides/web-api-for-admins.md index 6eaf5a069..514c49546 100644 --- a/docs/content/guides/web-api-for-admins.md +++ b/docs/content/guides/web-api-for-admins.md @@ -4,7 +4,7 @@ lang: en # Web API for Org Admins -The method names of a portion of [API Methods](https://api.slack.com/methods) start with `admin.`. These APIs are not available for all developers. They are supposed to be used by [Enterprise Grid](https://api.slack.com/enterprise/grid) Organization administrators. +The method names of a portion of [API Methods](https://docs.slack.dev/reference/methods) start with `admin.`. These APIs are not available for all developers. They are supposed to be used by [Enterprise Grid](https://docs.slack.dev/enterprise-grid/) Organization administrators. --- ## Call Web API for Org Admins @@ -36,4 +36,4 @@ AdminAppsApprovedListResponse response = slack.methods(orgAdminToken).adminAppsA // There are more...! ``` -You can look up the comprehensive list of admin APIs [here](https://api.slack.com/admins). Also, checking [the Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/com/slack/api/methods/MethodsClient.html) and search by a keyword starting with **`admin`** may be helpful to know methods to use. +You can look up the comprehensive list of admin APIs [here](https://docs.slack.dev/admins/). Also, checking [the Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/com/slack/api/methods/MethodsClient.html) and search by a keyword starting with **`admin`** may be helpful to know methods to use. diff --git a/docs/content/reference.md b/docs/content/reference.md index 3a3c1f077..7ba9b1995 100644 --- a/docs/content/reference.md +++ b/docs/content/reference.md @@ -9,8 +9,8 @@ All released versions are available on the Maven Central repositories. The lates | groupId:artifactId | Javadoc | Description | |----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| | [`com.slack.api:bolt`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt/sdkLatestVersion/bolt-sdkLatestVersion-javadoc.jar/!/index.html#package) | Bolt is a framework that offers an abstraction layer to build Slack apps safely and quickly. | -| [`com.slack.api:bolt-socket-mode`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt-socket-mode) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt-socket-mode/sdkLatestVersion/bolt-socket-mode-sdkLatestVersion-javadoc.jar/!/index.html#package) | This module offers a handy way to run Bolt apps through [Socket Mode](https://api.slack.com/) connections. | -| [`com.slack.api:bolt-jakarata-socket-mode`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt-jakarta-socket-mode) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt-jakarta-socket-mode/sdkLatestVersion/bolt-jakarta-socket-mode-sdkLatestVersion-javadoc.jar/!/index.html#package) | This module offers a handy way to run Bolt apps through [Socket Mode](https://api.slack.com/) connections (Jakarta EE compatible). | +| [`com.slack.api:bolt-socket-mode`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt-socket-mode) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt-socket-mode/sdkLatestVersion/bolt-socket-mode-sdkLatestVersion-javadoc.jar/!/index.html#package) | This module offers a handy way to run Bolt apps through [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode) connections. | +| [`com.slack.api:bolt-jakarata-socket-mode`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt-jakarta-socket-mode) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt-jakarta-socket-mode/sdkLatestVersion/bolt-jakarta-socket-mode-sdkLatestVersion-javadoc.jar/!/index.html#package) | This module offers a handy way to run Bolt apps through [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode) connections (Jakarta EE compatible). | | [`com.slack.api:bolt-servlet`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt-servlet) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt-servlet/sdkLatestVersion/bolt-servlet-sdkLatestVersion-javadoc.jar/!/index.html) | This module offers a handy way to run Bolt apps on the Java EE Servlet environments. | | [`com.slack.api:bolt-jetty`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt-jetty) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt-jetty/sdkLatestVersion/bolt-jetty-sdkLatestVersion-javadoc.jar/!/index.html) | This module offers a handy way to run Bolt apps on the [Java EE compatible Jetty HTTP server (9.x)](https://www.eclipse.org/jetty/). | | [`com.slack.api:bolt-jakarta-servlet`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:bolt-jakarta-servlet) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt-jakarta-servlet/sdkLatestVersion/bolt-jakarta-servlet-sdkLatestVersion-javadoc.jar/!/index.html) | This module offers a handy way to run Bolt apps on the Jakarta EE Servlet environments. | @@ -26,7 +26,7 @@ All released versions are available on the Maven Central repositories. The lates | groupId:artifactId |Javadoc| Description | |----------------------------------------------------------------------------------------------------------------------------------------------------|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [`com.slack.api:slack-api-model`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-model) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/index.html)| This is a collection of the classes representing the [Slack core objects](https://api.slack.com/types) such as conversations, messages, users, blocks, and surfaces. As this is an essential part of the SDK, all other modules depend on this. | +| [`com.slack.api:slack-api-model`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-model) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/index.html)| This is a collection of the classes representing the [Slack core objects](https://docs.slack.dev/reference/objects) such as conversations, messages, users, blocks, and surfaces. As this is an essential part of the SDK, all other modules depend on this. | | [`com.slack.api:slack-api-model-kotlin-extension`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-model-kotlin-extension) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model-kotlin-extension/sdkLatestVersion/slack-api-model-kotlin-extension-sdkLatestVersion-javadoc.jar/!/index.html)| This contains the Block Kit Kotlin DSL builder, which allows you to define block kit structures via a Kotlin-native DSL. | | [`com.slack.api:slack-api-client`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-client) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/index.html)| This is a collection of the Slack API clients. The supported are Basic API Methods, Socket Mode API, RTM API, SCIM API, Audit Logs API, and Status API. | | [`com.slack.api:slack-api-client-kotlin-extension`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-client-kotlin-extension) | [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client-kotlin-extension/sdkLatestVersion/slack-api-client-kotlin-extension-sdkLatestVersion-javadoc.jar/!/index.html)| This contains extension methods for various slack client message builders so you can seamlessly use the Block Kit Kotlin DSL directly on the Java message builders. | diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-distribution.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-distribution.md index 9ebefe9dd..8b1d1e952 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-distribution.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-distribution.md @@ -4,10 +4,10 @@ lang: ja # アプリの配布 (OAuth) -新しく作られた Slack アプリは、はじめは開発用ワークスペース(Development Workspace)にだけインストールすることができます。OAuth Redirect URL を設定して [App Distribution](https://api.slack.com/start/distributing) を有効にすると、そのアプリは他のどのワークスペースにもインストールできるようになります。 +新しく作られた Slack アプリは、はじめは開発用ワークスペース(Development Workspace)にだけインストールすることができます。OAuth Redirect URL を設定して [App Distribution](https://docs.slack.dev/distribution/) を有効にすると、そのアプリは他のどのワークスペースにもインストールできるようになります。 -* 「[Installing with OAuth(英語)](https://api.slack.com/authentication/oauth-v2)」 -* 「[Distributing Slack Apps(英語)](https://api.slack.com/start/distributing)」 +* 「[Installing with OAuth(英語)](https://docs.slack.dev/authentication/installing-with-oauth)」 +* 「[Distributing Slack Apps(英語)](https://docs.slack.dev/distribution/)」 ### Slack アプリの設定 @@ -15,7 +15,7 @@ lang: ja **Redirect URL** については Bolt for Java では `https://{あなたのドメイン}/slack/oauth/callback` のような URL で応答します。この URL を変更する方法などはこのページのあとのセクションの一覧を参照してください。 -Bolt for Java は、バージョン 1.4.0 から自動的に [OrG 全体へのインストール機能](https://api.slack.com/enterprise/apps)に対応しています。OrG 全体へのインストールは、Slack アプリ管理画面の **Org Level Apps** にある設定から有効にしてください。 +Bolt for Java は、バージョン 1.4.0 から自動的に [OrG 全体へのインストール機能](https://docs.slack.dev/enterprise-grid/)に対応しています。OrG 全体へのインストールは、Slack アプリ管理画面の **Org Level Apps** にある設定から有効にしてください。 ### Bolt アプリがやること @@ -26,7 +26,7 @@ Bolt アプリが OAuth フローをハンドルするためにやらなけれ * `client_id`, `scope`, `user_scope` (v2 のみ), `state` パラメーターを URL に付加する * Slack からリダイレクトされてきたユーザーリクエストを処理するエンドポイントを提供する * `state` パラメーターが正当かを検証する - * [oauth.v2.access](https://api.slack.com/methods/oauth.v2.access) (レガシーアプリの場合は [oauth.access](https://api.slack.com/methods/oauth.access)) API メソッドを呼び出してトークンを発行し、それを保存することでインストールを完了させる + * [oauth.v2.access](https://docs.slack.dev/reference/methods/oauth.v2.access) (レガシーアプリの場合は [oauth.access](https://docs.slack.dev/reference/methods/oauth.access)) API メソッドを呼び出してトークンを発行し、それを保存することでインストールを完了させる * インストールを実行したユーザーを誘導する完了・エラーページを用意する * これらの URL は通常別のどこかであることが多いが、Bolt アプリがそれをサーブすることも可能 @@ -146,23 +146,23 @@ SlackAppServer server = new SlackAppServer(new HashMap<>(Map.ofEntries( server.start(); // http://localhost:3000 ``` -もし[トークンローテーション](https://api.slack.com/authentication/rotation)を有効にしたいという場合は、あなたの `InstallationService` がトークンローテーション互換である必要があります。詳細は [v1.9.0 のリリースノート(英語)](https://github.com/slackapi/java-slack-sdk/releases/tag/v1.9.0)を参考にしてください。 +もし[トークンローテーション](https://docs.slack.dev/authentication/using-token-rotation)を有効にしたいという場合は、あなたの `InstallationService` がトークンローテーション互換である必要があります。詳細は [v1.9.0 のリリースノート(英語)](https://github.com/slackapi/java-slack-sdk/releases/tag/v1.9.0)を参考にしてください。 ### Granular Permission Apps と Classic Apps Slack アプリインストールには、二つの OAuth フローがあります。V2(ちょっと紛らわしいですが OAuth のバージョンではなく Slack OAuth フローのバージョンです)の OAuth フローでの Slack アプリは(特にボットユーザーの権限に関して)旧来に比べてより詳細な必要最小限の権限だけをリクエストできるようになりました。二つのやり方の違いは `v2` を Authorization URL やトークンを発行する API メソッドの URL に含んでいることと、API レスポンスのデータ構造に若干の変更が加わっていることです。 -#### [V2 OAuth 2.0 フロー](https://api.slack.com/authentication/oauth-v2) (デフォルト) +#### [V2 OAuth 2.0 フロー](https://docs.slack.dev/authentication/installing-with-oauth) (デフォルト) |-|-| |Authorization URL|`https://slack.com/oauth/v2/authorize`| -|トークン発行の API メソッド|[`oauth.v2.access`](https://api.slack.com/methods/oauth.v2.access) ([レスポンス](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthV2AccessResponse.java))| +|トークン発行の API メソッド|[`oauth.v2.access`](https://docs.slack.dev/reference/methods/oauth.v2.access) ([レスポンス](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthV2AccessResponse.java))| -#### [Classic OAuth フロー](https://api.slack.com/docs/oauth) +#### [Classic OAuth フロー](https://docs.slack.dev/authentication/installing-with-oauth) |-|-| |Authorization URL|`https://slack.com/oauth/authorize`| -|トークン発行の API メソッド|[`oauth.access`](https://api.slack.com/methods/oauth.access) ([レスポンス](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthAccessResponse.java))| +|トークン発行の API メソッド|[`oauth.access`](https://docs.slack.dev/reference/methods/oauth.access) ([レスポンス](https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/oauth/OAuthAccessResponse.java))| デフォルトでは Classic OAuth ではなく V2 の OAuth フローが有効になっています。Classic OAuth に対応させるためには **AppConfig** の setter メソッドで `classicAppPermissionsEnabled` を true に設定します。 @@ -253,7 +253,7 @@ public class SlackApp { #### 組み込みの tokens_revoked / app_uninstalled イベントハンドラーを利用する -あなたの顧客やエンドユーザーのデータを安全に管理するために [tokens_revoked](https://api.slack.com/events/tokens_revoked) と [app_uninstalled](https://api.slack.com/events/app_uninstalled) というイベントを適切にハンドリングすることは非常に重要です。Bolt for Java は、これらのイベントのための組み込みのハンドラーを提供しており、それは `InstallationService` が提供するデータ削除系メソッドとシームレスに連携します。 +あなたの顧客やエンドユーザーのデータを安全に管理するために [tokens_revoked](https://docs.slack.dev/reference/events/tokens_revoked) と [app_uninstalled](https://docs.slack.dev/reference/events/app_uninstalled) というイベントを適切にハンドリングすることは非常に重要です。Bolt for Java は、これらのイベントのための組み込みのハンドラーを提供しており、それは `InstallationService` が提供するデータ削除系メソッドとシームレスに連携します。 ```java App app = new App(); diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-home.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-home.md index 8f219af08..3d17f6a59 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-home.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/app-home.md @@ -4,7 +4,7 @@ lang: ja # Home タブ -[App Home](https://api.slack.com/surfaces/tabs/events) は、Slack の中でもユーザーにとってプライベートな、アプリと 1 対 1 で共有しているスペースです。各アプリの App Home は複数のタブを持つことができ、アプリのボットユーザーとの会話の履歴である Messages タブ、アプリによってユーザーひとりひとりにそれぞれ個別にカスタマイズされている Home タブがあります。 +[App Home](https://docs.slack.dev/surfaces/app-home) は、Slack の中でもユーザーにとってプライベートな、アプリと 1 対 1 で共有しているスペースです。各アプリの App Home は複数のタブを持つことができ、アプリのボットユーザーとの会話の履歴である Messages タブ、アプリによってユーザーひとりひとりにそれぞれ個別にカスタマイズされている Home タブがあります。 ### Slack アプリの設定 @@ -24,17 +24,17 @@ Home タブを有効にするには [Slack アプリ管理画面](http://api.sla Bolt アプリが Home タブの提供のためにやらなければならないことは以下の通りです。 -1. ユーザごとに Home タブを更新するために [**views.publish**](https://api.slack.com/methods/views.publish) API メソッドを呼び出す +1. ユーザごとに Home タブを更新するために [**views.publish**](https://docs.slack.dev/reference/methods/views.publish) API メソッドを呼び出す 2. Home タブ上で発生したユーザーインタラクション (`"block_actions"`, `"block_suggestion"`) をハンドリング -よくある手法としては [`"app_home_opened"`](https://api.slack.com/events/app_home_opened) のイベントを使って [**views.publish**](https://api.slack.com/methods/views.publish) API メソッドを呼び出すきっかけに使うという実装があります。特に初回更新にはこのイベントの利用が必要です。しかし、それ以外のタイミング・手段で Home タブを更新することも全く問題ありません。 +よくある手法としては [`"app_home_opened"`](https://docs.slack.dev/reference/events/app_home_opened) のイベントを使って [**views.publish**](https://docs.slack.dev/reference/methods/views.publish) API メソッドを呼び出すきっかけに使うという実装があります。特に初回更新にはこのイベントの利用が必要です。しかし、それ以外のタイミング・手段で Home タブを更新することも全く問題ありません。 --- ## コード例 **注**: もし Bolt を使った Slack アプリ開発にまだ慣れていない方は、まず「[Bolt 入門](/guides/getting-started-with-bolt)」を読んでください。 -以下のコードは、ユーザーが App Home にアクセスして [`"app_home_opened"` イベント](https://api.slack.com/events/app_home_opened)が発火したときに [**views.publish**](https://api.slack.com/methods/views.publish) API メソッドによって Home タブを更新しています。[**views.publish**](https://api.slack.com/methods/views.publish) の呼び出しが成功すれば、即座に Home タブの変更が反映されます。 +以下のコードは、ユーザーが App Home にアクセスして [`"app_home_opened"` イベント](https://docs.slack.dev/reference/events/app_home_opened)が発火したときに [**views.publish**](https://docs.slack.dev/reference/methods/views.publish) API メソッドによって Home タブを更新しています。[**views.publish**](https://docs.slack.dev/reference/methods/views.publish) の呼び出しが成功すれば、即座に Home タブの変更が反映されます。 ```java import com.slack.api.methods.response.views.ViewsPublishResponse; @@ -46,7 +46,7 @@ import static com.slack.api.model.block.Blocks.*; import static com.slack.api.model.block.composition.BlockCompositions.*; import static com.slack.api.model.view.Views.*; -// https://api.slack.com/events/app_home_opened +// https://docs.slack.dev/reference/events/app_home_opened app.event(AppHomeOpenedEvent.class, (payload, ctx) -> { // Home タブの view を構成 ZonedDateTime now = ZonedDateTime.now(); @@ -85,7 +85,7 @@ import com.slack.api.model.view.Views.* import com.slack.api.model.event.AppHomeOpenedEvent import java.time.ZonedDateTime -// https://api.slack.com/events/app_home_opened +// https://docs.slack.dev/reference/events/app_home_opened app.event(AppHomeOpenedEvent::class.java) { event, ctx -> // Home タブの view を構成 val now = ZonedDateTime.now() diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/assistants.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/assistants.md index e8499f372..b7d93f11c 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/assistants.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/assistants.md @@ -4,11 +4,11 @@ lang: en # エージェント・アシスタント -このページは、Bolt を使ってエージェント・アシスタントを実装するための方法を紹介します。この機能に関する一般的な情報については、[こちらのドキュメントページ(英語)](https://api.slack.com/docs/apps/ai)を参照してください。 +このページは、Bolt を使ってエージェント・アシスタントを実装するための方法を紹介します。この機能に関する一般的な情報については、[こちらのドキュメントページ(英語)](https://docs.slack.dev/ai/)を参照してください。 ## Slack App Configuration -この機能を実装するためには、まず[アプリの設定画面](https://api.slack.com/apps)で **Agents & Assistants** 機能を有効にし、**OAuth & Permissions** のページで [`assistant:write`](https://api.slack.com/scopes/assistant:write)、[`chat:write`](https://api.slack.com/scopes/chat:write)、[`im:history`](https://api.slack.com/scopes/im:history) を**ボットの**スコープに追加し、**Event Subscriptions** のページで [`assistant_thread_started`](https://api.slack.com/events/assistant_thread_started)、[`assistant_thread_context_changed`](https://api.slack.com/events/assistant_thread_context_changed)、[`message.im`](https://api.slack.com/events/message.im) イベントを有効にしてください。 +この機能を実装するためには、まず[アプリの設定画面](https://api.slack.com/apps)で **Agents & Assistants** 機能を有効にし、**OAuth & Permissions** のページで [`assistant:write`](https://docs.slack.dev/reference/scopes/assistant.write)、[`chat:write`](https://docs.slack.dev/reference/scopes/chat.write)、[`im:history`](https://docs.slack.dev/reference/scopes/im.history) を**ボットの**スコープに追加し、**Event Subscriptions** のページで [`assistant_thread_started`](https://docs.slack.dev/reference/events/assistant_thread_started)、[`assistant_thread_context_changed`](https://docs.slack.dev/reference/events/assistant_thread_context_changed)、[`message.im`](https://docs.slack.dev/reference/events/message.im) イベントを有効にしてください。 また、この機能は Slack の有料プランでのみ利用可能です。もし開発用の有料プランのワークスペースをお持ちでない場合は、[Developer Program](https://api.slack.com/developer-program) に参加し、全ての有料プラン向け機能を利用可能なサンドボックス環境をつくることができます。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/audit-logs-api.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/audit-logs-api.md index c6c8a781a..7002931cf 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/audit-logs-api.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/audit-logs-api.md @@ -4,11 +4,11 @@ lang: ja # Audit Logs API -[Audit Logs API](https://api.slack.com/docs/audit-logs-api) は [Enterprise Grid](https://api.slack.com/enterprise/grid) の [OrG](https://slack.com/intl/ja-jp/help/articles/360004150931) 内で発生したイベントをモニタリングするための API 群です。 +[Audit Logs API](https://docs.slack.dev/admins/audit-logs-api) は [Enterprise Grid](https://docs.slack.dev/enterprise-grid/) の [OrG](https://slack.com/intl/ja-jp/help/articles/360004150931) 内で発生したイベントをモニタリングするための API 群です。 Audit Logs API は、各種 SIEM (Security Information and Event Management) ツールによって Slack の OrG がどのようにアクセスされているかの分析結果を提供するために利用されることがあります。アプリケーションを開発して OrG のメンバーがどのように Slack を使っているかを確認する用途にも利用できます。 -Audit Logs API で利用できるトークンの取得は「[Monitoring workspace events with the Audit Logs API(英語)](https://api.slack.com/docs/audit-logs-api)」で解説されている手順に従ってください。Audit Logs API を利用する Slack アプリは、通常のアプリのように個々のワークスペース単位でインストールするのではなく OrG レベルでインストールする必要があります。 +Audit Logs API で利用できるトークンの取得は「[Monitoring workspace events with the Audit Logs API(英語)](https://docs.slack.dev/admins/audit-logs-api)」で解説されている手順に従ってください。Audit Logs API を利用する Slack アプリは、通常のアプリのように個々のワークスペース単位でインストールするのではなく OrG レベルでインストールする必要があります。 --- ## Audit Logs API を Java で利用 @@ -75,7 +75,7 @@ ActionsResponse response = audit.getActions(); --- ## Rate Limits -Slack の Audit Logs API は、期待通りの快適なユーザー体験を提供するために、その [Rate Limits](https://api.slack.com/docs/rate-limits) に依拠しています。全ての API メソッドは Tier 3(毎分 50 回以内 / 瞬間的なバーストトラフィックは許容)の Rate Limit が適用されます。詳細は [API ドキュメント](https://api.slack.com/admins/audit-logs#how_to_call_the_audit_logs_api)を参考にしてください。 +Slack の Audit Logs API は、期待通りの快適なユーザー体験を提供するために、その [Rate Limits](https://docs.slack.dev/apis/web-api/rate-limits) に依拠しています。全ての API メソッドは Tier 3(毎分 50 回以内 / 瞬間的なバーストトラフィックは許容)の Rate Limit が適用されます。詳細は [API ドキュメント](https://docs.slack.dev/admins/audit-logs-api)を参考にしてください。 **AsyncAuditClient** (非同期クライアント)はその実行において Rate Limits を考慮します。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/bolt-basics.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/bolt-basics.md index 607f1c63a..44b0fde23 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/bolt-basics.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/bolt-basics.md @@ -6,7 +6,7 @@ lang: ja **Bolt for Java** は、最新のプラットフォーム機能を使った Slack アプリの開発をスピーディに行うための抽象レイヤーを提供するフレームワークです。 -このガイドは、Bolt を使ったアプリ開発の基礎的な内容を全てカバーします。なお Slack アプリ開発全般についてまだ不慣れな方は、まず「[An introduction to Slack apps(英語)](https://api.slack.com/start/overview)」に軽く目を通した方がよいかもしれません。 +このガイドは、Bolt を使ったアプリ開発の基礎的な内容を全てカバーします。なお Slack アプリ開発全般についてまだ不慣れな方は、まず「[An introduction to Slack apps(英語)](https://docs.slack.dev/)」に軽く目を通した方がよいかもしれません。 --- ## App クラス @@ -77,7 +77,7 @@ app.command("/ping", (req, ctx) -> { }); ``` -よりインタラクティブなメッセージを送るために [Block Kit](https://api.slack.com/block-kit) を使用することも可能です。 +よりインタラクティブなメッセージを送るために [Block Kit](https://docs.slack.dev/block-kit/) を使用することも可能です。 ```java import static com.slack.api.model.block.Blocks.*; @@ -107,7 +107,7 @@ app.command("/ping", (req, ctx) -> { --- ## ユーザーアクションに respond する -`response_url` についてすでにご存知ですか?もしまだでしたら、まず「[Handling user interaction in your Slack apps > Message responses(英語)](https://api.slack.com/interactivity/handling#message_responses)」を読むことをおすすめします。 +`response_url` についてすでにご存知ですか?もしまだでしたら、まず「[Handling user interaction in your Slack apps > Message responses(英語)](https://docs.slack.dev/interactivity/handling-user-interaction)」を読むことをおすすめします。 そのガイドページが説明しているように、一部のユーザーインタラクションによるペイロードは `response_url` というプロパティを持っています。この `response_url` は、各ペイロードに一意な URL で、そのインタラクションが発生した場所(チャンネル)にメッセージを送信するために使うことができます。 @@ -167,7 +167,7 @@ app.command("/hello", (req, ctx) -> { }); ``` -ちなみにペイロードに含まれているチャンネル ID を用いた [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) API の呼び出しに限っては `say()` というユーティリティメソッドを使えば、より簡単になります。もし、あらゆる場所でこのスラッシュコマンドを使えるようにしたい場合は `ctx.respond` を使う方が安全でしょう。`say()` は、あなたのアプリのボットユーザーがメンバーではない会話(例:個人の DM)では使用することができないためです。 +ちなみにペイロードに含まれているチャンネル ID を用いた [**chat.postMessage**](https://docs.slack.dev/reference/methods/chat.postmessage) API の呼び出しに限っては `say()` というユーティリティメソッドを使えば、より簡単になります。もし、あらゆる場所でこのスラッシュコマンドを使えるようにしたい場合は `ctx.respond` を使う方が安全でしょう。`say()` は、あなたのアプリのボットユーザーがメンバーではない会話(例:個人の DM)では使用することができないためです。 ```java app.command("/hello", (req, ctx) -> { diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/composing-messages.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/composing-messages.md index aea342c0d..bd22118b6 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/composing-messages.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/composing-messages.md @@ -4,9 +4,9 @@ lang: ja # メッセージの組み立て方 -このセクションでは **slack-api-client** を使って Slack メッセージを組み立てる方法を解説します。もし、まだ [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) API を使ったことがなければ、このページのサンプルを試す前にまず[こちらのページ](/guides/web-api-basics)を読んでください。 +このセクションでは **slack-api-client** を使って Slack メッセージを組み立てる方法を解説します。もし、まだ [**chat.postMessage**](https://docs.slack.dev/reference/methods/chat.postmessage) API を使ったことがなければ、このページのサンプルを試す前にまず[こちらのページ](/guides/web-api-basics)を読んでください。 -また、Java でのコーディングに入る前に「[An overview of message composition(英語)](https://api.slack.com/messaging/composing)」を一読して、Slack メッセージの組み立て方について理解を深めることをおすすめします。 +また、Java でのコーディングに入る前に「[An overview of message composition(英語)](https://docs.slack.dev/messaging/)」を一読して、Slack メッセージの組み立て方について理解を深めることをおすすめします。 --- ## テキストの整形 @@ -29,12 +29,12 @@ ChatPostMessageResponse response = slack.methods(token).chatPostMessage(req -> r ); ``` -見ての通り、`text` を使うのはとてもシンプルです。知らなければならないことは、正しい形式の文字列を指定する方法だけです。Slack でのマークアップ方式については「[Basic formatting with `mrkdwn`(英語)](https://api.slack.com/reference/surfaces/formatting#basics)」を参照してください。 +見ての通り、`text` を使うのはとてもシンプルです。知らなければならないことは、正しい形式の文字列を指定する方法だけです。Slack でのマークアップ方式については「[Basic formatting with `mrkdwn`(英語)](https://docs.slack.dev/messaging/formatting-message-text)」を参照してください。 --- ## Block を使ったリッチなレイアウト -[Block Kit](https://api.slack.com/block-kit) は、メッセージやその他の[サーフェスエリア](https://api.slack.com/surfaces)で利用することができる Slack アプリのための UI フレームワークです。Block Kit は優れたバランスで UI の制御と柔軟性を提供します。 +[Block Kit](https://docs.slack.dev/block-kit/) は、メッセージやその他の[サーフェスエリア](https://docs.slack.dev/surfaces/)で利用することができる Slack アプリのための UI フレームワークです。Block Kit は優れたバランスで UI の制御と柔軟性を提供します。 特に大きな JSON データ構造になると、それを Java コード内で構築することがやりやすくない場合もあります。そのため、このライブラリでは `blocks` 全体を一つの文字列として渡すことができる `blocksAsString(String)` のようなメソッドも提供しています。このようなメソッドは外部ファイルからの読み込みやテンプレートエンジンとの併用を想定しています。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/events-api.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/events-api.md index 4320aeb05..d1bf4d4f5 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/events-api.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/events-api.md @@ -4,7 +4,7 @@ lang: ja # イベント API -[イベント API](https://api.slack.com/events-api) は、Slack 内でのアクティビティに反応する Slack アプリを作るための洗練された、簡単な方法です。必要なものは Slack アプリの設定と、セキュアなイベントの送信先だけです。 +[イベント API](https://docs.slack.dev/apis/events-api/) は、Slack 内でのアクティビティに反応する Slack アプリを作るための洗練された、簡単な方法です。必要なものは Slack アプリの設定と、セキュアなイベントの送信先だけです。 ### Slack アプリの設定 @@ -23,7 +23,7 @@ lang: ja Bolt アプリがイベントへの応答のためにやらなければならないことは以下の通りです。 -1. Slack API からのリクエストを[検証](https://api.slack.com/docs/verifying-requests-from-slack) +1. Slack API からのリクエストを[検証](https://docs.slack.dev/authentication/verifying-requests-from-slack) 1. リクエストボディをパースして `event` の中の `type` が処理対象か確認 1. イベントデータを使った任意の処理 1. 受け取ったことを伝えるために Slack API へ 200 OK 応答 @@ -37,11 +37,11 @@ Bolt アプリは Slack API サーバーからのリクエストに対して 3 Bolt は Slack アプリに必要な共通処理の多くを巻き取ります。それを除いて、あなたのアプリがやらなければならない手順は以下の通りです。 -* 処理する `event.type` を[イベントデータの Java クラス](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/com/slack/api/model/event/Event.html)で指定 ([必要に応じて](https://api.slack.com/events/message#message_subtypes)さらに `event.subtype` も考慮) +* 処理する `event.type` を[イベントデータの Java クラス](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/com/slack/api/model/event/Event.html)で指定 ([必要に応じて](https://docs.slack.dev/reference/events/message)さらに `event.subtype` も考慮) * イベントデータを使った任意の処理 * 受け取ったことを伝えるために `ack()` -このリクエストは、ユーザーインタラクションからの直接の呼び出しではないので、ペイロードには `response_url` は含まれていません。また、同じ理由から `ctx.ack()` を使ってチャンネルにメッセージを投稿することもできません。もし、対象のイベントがユーザーインタラクションによるもので、そのユーザーへの返信として投稿したい場合は、イベントのペイロードに含まれている `channel` を使って [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) API メソッドや類する API を実行してください。 +このリクエストは、ユーザーインタラクションからの直接の呼び出しではないので、ペイロードには `response_url` は含まれていません。また、同じ理由から `ctx.ack()` を使ってチャンネルにメッセージを投稿することもできません。もし、対象のイベントがユーザーインタラクションによるもので、そのユーザーへの返信として投稿したい場合は、イベントのペイロードに含まれている `channel` を使って [**chat.postMessage**](https://docs.slack.dev/reference/methods/chat.postmessage) API メソッドや類する API を実行してください。 ```java import com.slack.api.methods.response.chat.ChatPostMessageResponse; @@ -151,7 +151,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Slack からのリクエストを検証 - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // "X-Slack-Signature" header, "X-Slack-Request-Timestamp" ヘッダーとリクエストボディを検証 if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt-socket-mode.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt-socket-mode.md index 541415491..6e602deb8 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt-socket-mode.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt-socket-mode.md @@ -8,7 +8,7 @@ lang: ja このガイドでは、初めての Bolt アプリを開発する手順を紹介します。 -なお Slack アプリ開発全般についてまだ不慣れな方は、まず「[An introduction to Slack apps(英語)](https://api.slack.com/start/overview)」に軽く目を通した方がよいかもしれません。 +なお Slack アプリ開発全般についてまだ不慣れな方は、まず「[An introduction to Slack apps(英語)](https://docs.slack.dev/)」に軽く目を通した方がよいかもしれません。 --- ## プロジェクトのセットアップ @@ -17,7 +17,7 @@ lang: ja ### Maven -[Maven プロジェクトを作成](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)した後、まずは **bolt** 依存ライブラリを `pom.xml` に追加します。このライブラリ自体は特定の環境に依存していません。[ソケットモード](https://api.slack.com/apis/connections/socket)を有効にするためには **bolt-socket-mode** というライブラリとその provided スコープの必要な依存ライブラリも合わせて追加してください。 +[Maven プロジェクトを作成](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)した後、まずは **bolt** 依存ライブラリを `pom.xml` に追加します。このライブラリ自体は特定の環境に依存していません。[ソケットモード](https://docs.slack.dev/apis/events-api/using-socket-mode)を有効にするためには **bolt-socket-mode** というライブラリとその provided スコープの必要な依存ライブラリも合わせて追加してください。 ```xml @@ -86,7 +86,7 @@ dependencies { ### **bolt-socket-mode** の利用 -**bolt-socket-mode** は[ソケットモード](https://api.slack.com/apis/connections/socket)の Slack アプリを起動する手軽な手段です。このモジュールを使えば、開発者は **App** インスタンスを初期化して処理をスタートする main メソッドを書くだけで WebSocket コネクションを確立することができます。 +**bolt-socket-mode** は[ソケットモード](https://docs.slack.dev/apis/events-api/using-socket-mode)の Slack アプリを起動する手軽な手段です。このモジュールを使えば、開発者は **App** インスタンスを初期化して処理をスタートする main メソッドを書くだけで WebSocket コネクションを確立することができます。 #### build.gradle @@ -166,7 +166,7 @@ new SocketModeApp(app).start(); |環境変数名|説明| |-|-| -|**SLACK_BOT_TOKEN**|開発用ワークスペース(Development Workspace)での有効なボットトークン(形式は `xoxb-` から始まります)です。このボットトークンを発行するには Slack アプリを開発用ワークスペースにインストールする必要があります。[Slack アプリ管理画面](http://api.slack.com/apps)にアクセスして、開発中のアプリを選択、左ペインの **Settings** > **Install App** から実行します(「Please add at least one feature or permission scope to install your app.」というメッセージが表示されている場合は [`app_mentions:read`](https://api.slack.com/scopes/app_mentions:read) bot scope を追加してください)。

複数のワークスペースにインストール可能なアプリとして実行する場合はこの環境変数を設定する必要はありません。そのようなアプリの開発については「[アプリの配布 (OAuth)](/guides/app-distribution)」を参考にしてください。| +|**SLACK_BOT_TOKEN**|開発用ワークスペース(Development Workspace)での有効なボットトークン(形式は `xoxb-` から始まります)です。このボットトークンを発行するには Slack アプリを開発用ワークスペースにインストールする必要があります。[Slack アプリ管理画面](http://api.slack.com/apps)にアクセスして、開発中のアプリを選択、左ペインの **Settings** > **Install App** から実行します(「Please add at least one feature or permission scope to install your app.」というメッセージが表示されている場合は [`app_mentions:read`](https://docs.slack.dev/reference/scopes/app_mentions.read) bot scope を追加してください)。

複数のワークスペースにインストール可能なアプリとして実行する場合はこの環境変数を設定する必要はありません。そのようなアプリの開発については「[アプリの配布 (OAuth)](/guides/app-distribution)」を参考にしてください。| |**SLACK_APP_TOKEN**|この Slack アプリの有効なアプリレベルトークン(形式は `xapp-` から始まります)です。トークンを発行するには、[Slack アプリ管理画面](http://api.slack.com/apps)にアクセスして、開発中のアプリを選択、左ペインの **Settings** > **Basic Information** > **App-Level Tokens** へ移動し、`connections:write` というスコープにしたトークンを作成します。| なお、**App** を別の方法(例: 規定の環境変数名を使わない)で初期化したい場合は **AppConfig** を自前で初期化するコードを書いてください。 @@ -196,8 +196,8 @@ mvn compile exec:java -Dexec.mainClass="hello.MyApp" * ✅ Gradle をインストール(もしまだであれば macOS は `brew install gradle` を実行 / 他の OS 環境の場合は [公式サイト](https://gradle.org/) へアクセス) * ✅ `build.gradle` に **bolt-socket-mode** と **tyrus-standalone-client** の依存ライブラリを追加、適切な **application** プラグイン設定も追加 * ✅ main メソッドを持つ `src/main/java/hello/MyApp.java` を作成 -* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`commands`](https://api.slack.com/scopes/commands) という Bot Token Scope を追加、**`connections:write` スコープを設定したアプリレベルトークンを作成**、アプリを開発用ワークスペースにインストール -* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://api.slack.com/docs/token-types#bot) と [**App-Level Token**](https://api.slack.com/docs/token-types#app) の値をコピーしてきて環境変数に設定 +* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`commands`](https://docs.slack.dev/reference/scopes/commands) という Bot Token Scope を追加、**`connections:write` スコープを設定したアプリレベルトークンを作成**、アプリを開発用ワークスペースにインストール +* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://docs.slack.dev/authentication/tokens#bot) と [**App-Level Token**](https://docs.slack.dev/authentication/tokens#app-level) の値をコピーしてきて環境変数に設定 ### `/hello` コマンドの有効化 @@ -273,8 +273,8 @@ fun main() { * ✅ Gradle をインストール(もしまだであれば macOS は `brew install gradle` を実行 / 他の OS 環境の場合は [公式サイト](https://gradle.org/) へアクセス) * ✅ `build.gradle` に適切な Kotlin の言語設定と **bolt-socket-mode** と **tyrus-standalone-client** を依存ライブラリを追加 * ✅ main メソッドを持つ `src/main/kotlin/MyApp.kt` を作成 -* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`commands`](https://api.slack.com/scopes/commands) という Bot Token Scope を追加、**`connections:write` スコープを設定したアプリレベルトークンを作成**、アプリを開発用ワークスペースにインストール -* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://api.slack.com/docs/token-types#bot) と [**App-Level Token**](https://api.slack.com/docs/token-types#app) の値をコピーしてきて環境変数に設定 +* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`commands`](https://docs.slack.dev/reference/scopes/commands) という Bot Token Scope を追加、**`connections:write` スコープを設定したアプリレベルトークンを作成**、アプリを開発用ワークスペースにインストール +* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://docs.slack.dev/authentication/tokens#bot) と [**App-Level Token**](https://docs.slack.dev/authentication/tokens#app-level) の値をコピーしてきて環境変数に設定 すべてが OK ✅であれば、あなたのはじめての Kotlin を使った Bolt アプリが正常に起動するはずです。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt.md index b097c87cd..9496ef7f7 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/getting-started-with-bolt.md @@ -8,7 +8,7 @@ lang: ja このガイドでは、初めての Bolt アプリを開発する手順を紹介します。 -なお Slack アプリ開発全般についてまだ不慣れな方は、まず「[An introduction to Slack apps(英語)](https://api.slack.com/start/overview)」に軽く目を通した方がよいかもしれません。 +なお Slack アプリ開発全般についてまだ不慣れな方は、まず「[An introduction to Slack apps(英語)](https://docs.slack.dev/)」に軽く目を通した方がよいかもしれません。 --- ## プロジェクトのセットアップ @@ -154,8 +154,8 @@ server.start(); |環境変数名|説明| |-|-| -|**SLACK_BOT_TOKEN**|開発用ワークスペース(Development Workspace)での有効なボットトークン(形式は `xoxb-` から始まります)です。このボットトークンを発行するには Slack アプリを開発用ワークスペースにインストールする必要があります。[Slack アプリ管理画面](http://api.slack.com/apps)にアクセスして、開発中のアプリを選択、左ペインの **Settings** > **Install App** から実行します(「Please add at least one feature or permission scope to install your app.」というメッセージが表示されている場合は [`app_mentions:read`](https://api.slack.com/scopes/app_mentions:read) bot scope を追加してください)。

複数のワークスペースにインストール可能なアプリとして実行する場合はこの環境変数を設定する必要はありません。そのようなアプリの開発については「[アプリの配布 (OAuth)](/guides/app-distribution)」を参考にしてください。| -|**SLACK_SIGNING_SECRET**|この秘密の値は Slack プラットフォームとだけ共有する情報です。これは Slack アプリが受けたリクエストが本当に Slack API サーバーからのリクエストであるかを検証するために使用します。Slack アプリは公開されたエンドポイントを持つため、リクエストの検証はセキュリティのために重要です。この値は [Slack アプリ管理画面](http://api.slack.com/apps)にアクセスして、開発中のアプリを選択、左ペインの **Settings** > **Basic Information** へ遷移して **App Credentials** > **Signing Secret** の情報を表示させると確認できます。より詳細な情報は「[Verifying requests from Slack(英語)](https://api.slack.com/docs/verifying-requests-from-slack)」を参考にしてください。| +|**SLACK_BOT_TOKEN**|開発用ワークスペース(Development Workspace)での有効なボットトークン(形式は `xoxb-` から始まります)です。このボットトークンを発行するには Slack アプリを開発用ワークスペースにインストールする必要があります。[Slack アプリ管理画面](http://api.slack.com/apps)にアクセスして、開発中のアプリを選択、左ペインの **Settings** > **Install App** から実行します(「Please add at least one feature or permission scope to install your app.」というメッセージが表示されている場合は [`app_mentions:read`](https://docs.slack.dev/reference/scopes/app_mentions.read) bot scope を追加してください)。

複数のワークスペースにインストール可能なアプリとして実行する場合はこの環境変数を設定する必要はありません。そのようなアプリの開発については「[アプリの配布 (OAuth)](/guides/app-distribution)」を参考にしてください。| +|**SLACK_SIGNING_SECRET**|この秘密の値は Slack プラットフォームとだけ共有する情報です。これは Slack アプリが受けたリクエストが本当に Slack API サーバーからのリクエストであるかを検証するために使用します。Slack アプリは公開されたエンドポイントを持つため、リクエストの検証はセキュリティのために重要です。この値は [Slack アプリ管理画面](http://api.slack.com/apps)にアクセスして、開発中のアプリを選択、左ペインの **Settings** > **Basic Information** へ遷移して **App Credentials** > **Signing Secret** の情報を表示させると確認できます。より詳細な情報は「[Verifying requests from Slack(英語)](https://docs.slack.dev/authentication/verifying-requests-from-slack)」を参考にしてください。| なお、**App** を別の方法(例: 規定の環境変数名を使わない)で初期化したい場合は **AppConfig** を自前で初期化するコードを書いてください。 @@ -186,8 +186,8 @@ mvn compile exec:java -Dexec.mainClass="hello.MyApp" * ✅ Gradle をインストール(もしまだであれば macOS は `brew install gradle` を実行 / 他の OS 環境の場合は [公式サイト](https://gradle.org/) へアクセス) * ✅ `build.gradle` に **bolt-jetty** 依存ライブラリを追加、適切な **application** プラグイン設定も追加 * ✅ main メソッドを持つ `src/main/java/hello/MyApp.java` を作成 -* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`app_mentions:read`](https://api.slack.com/scopes/app_mentions:read) という Bot Token Scope を追加、アプリを開発用ワークスペースにインストール -* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://api.slack.com/docs/token-types#bot) と [**Signing Secret**](https://api.slack.com/docs/verifying-requests-from-slack) の値をコピーしてきて環境変数に設定 +* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`app_mentions:read`](https://docs.slack.dev/reference/scopes/app_mentions.read) という Bot Token Scope を追加、アプリを開発用ワークスペースにインストール +* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://docs.slack.dev/authentication/tokens#bot) と [**Signing Secret**](https://docs.slack.dev/authentication/verifying-requests-from-slack) の値をコピーしてきて環境変数に設定 ### `/hello` コマンドの有効化 @@ -294,8 +294,8 @@ fun main() { * ✅ Gradle をインストール(もしまだであれば macOS は `brew install gradle` を実行 / 他の OS 環境の場合は [公式サイト](https://gradle.org/) へアクセス) * ✅ `build.gradle` に適切な Kotlin の言語設定と **bolt-jetty** 依存ライブラリを追加 * ✅ main メソッドを持つ `src/main/kotlin/MyApp.kt` を作成 -* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`app_mentions:read`](https://api.slack.com/scopes/app_mentions:read) という Bot Token Scope を追加、アプリを開発用ワークスペースにインストール -* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://api.slack.com/docs/token-types#bot) と [**Signing Secret**](https://api.slack.com/docs/verifying-requests-from-slack) の値をコピーしてきて環境変数に設定 +* ✅ [Slack アプリをつくり](https://api.slack.com/apps?new_app=1) [`app_mentions:read`](https://docs.slack.dev/reference/scopes/app_mentions.read) という Bot Token Scope を追加、アプリを開発用ワークスペースにインストール +* ✅ [Slack アプリ管理画面](https://api.slack.com/apps) から [**Bot User OAuth Access Token**](https://docs.slack.dev/authentication/tokens#bot) と [**Signing Secret**](https://docs.slack.dev/authentication/verifying-requests-from-slack) の値をコピーしてきて環境変数に設定 すべてが OK ✅であれば、あなたのはじめての Kotlin を使った Bolt アプリが正常に起動するはずです。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/incoming-webhooks.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/incoming-webhooks.md index 2f20e4cd4..dcf94ca53 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/incoming-webhooks.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/incoming-webhooks.md @@ -4,7 +4,7 @@ lang: ja # Incoming Webhooks -[Incoming Webhooks](https://api.slack.com/messaging/webhooks) は他のアプリから Slack にメッセージを投稿するためのとてもシンプルな方法です。Incoming Webhook を作成すると、メッセージとその他のオプションを含む JSON ペイロードを送るための一意な URL が払い出されます。 +[Incoming Webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks) は他のアプリから Slack にメッセージを投稿するためのとてもシンプルな方法です。Incoming Webhook を作成すると、メッセージとその他のオプションを含む JSON ペイロードを送るための一意な URL が払い出されます。 ### Slack アプリ設定 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/interactive-components.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/interactive-components.md index 60fc78ec7..3ad1d6e74 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/interactive-components.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/interactive-components.md @@ -4,9 +4,9 @@ lang: ja # インタラクティブコンポーネント -[インタラクティブコンポーネント](https://api.slack.com/reference/block-kit/interactive-components)は、様々な[サーフェスエリア](https://api.slack.com/surfaces)にインタラクティビティをもたらす [Block Kit](https://api.slack.com/block-kit) エレメントのサブセットです。blocks でのインタラクションはチャンネル内のメッセージ上だけではなく、[モーダル](/guides/modals) や [Home タブ](/guides/app-home) でも発生します。 +[インタラクティブコンポーネント](https://docs.slack.dev/block-kit/#making-things-interactive)は、様々な[サーフェスエリア](https://docs.slack.dev/surfaces/)にインタラクティビティをもたらす [Block Kit](https://docs.slack.dev/block-kit/) エレメントのサブセットです。blocks でのインタラクションはチャンネル内のメッセージ上だけではなく、[モーダル](/guides/modals) や [Home タブ](/guides/app-home) でも発生します。 -この SDK で [Block Kit](https://api.slack.com/block-kit) を使ったメッセージを組み立てる方法は「[メッセージの組み立て方](/guides/composing-messages)」を参考にしてください。 +この SDK で [Block Kit](https://docs.slack.dev/block-kit/) を使ったメッセージを組み立てる方法は「[メッセージの組み立て方](/guides/composing-messages)」を参考にしてください。 ### Slack アプリの設定 @@ -20,7 +20,7 @@ lang: ja Bolt アプリがユーザーインタラクションへの応答のためにやらなければならないことは以下の通りです。 -1. Slack API からのリクエストを[検証](https://api.slack.com/docs/verifying-requests-from-slack) +1. Slack API からのリクエストを[検証](https://docs.slack.dev/authentication/verifying-requests-from-slack) 1. リクエストボディをパースして `action_id` が処理対象か確認 1. ユーザとの次のインタラクションのためのメッセージやその他のインターフェースを構築 1. 受け取ったことを伝えるために Slack API へ 200 OK 応答 @@ -80,7 +80,7 @@ app.blockAction("button-action") { req, ctx -> } ``` -次は[外部データソース(external data source)を使ったセレクトメニュー](https://api.slack.com/reference/block-kit/block-elements#external_select)の例です。 +次は[外部データソース(external data source)を使ったセレクトメニュー](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#external_multi_select)の例です。 ```javascript { @@ -169,7 +169,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Slack からのリクエストを検証 - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // "X-Slack-Signature" header, "X-Slack-Request-Timestamp" ヘッダーとリクエストボディを検証 if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/modals.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/modals.md index 62c568309..f8bfbdfe6 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/modals.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/modals.md @@ -4,7 +4,7 @@ lang: ja # モーダル -[モーダル](https://api.slack.com/surfaces/modals/using)は、ユーザからデータを収集したり、動的でインタラクティブな表示を見せることに特化したインターフェースです。モーダルは Slack 内でユーザがアプリとの端的でありながらも深いインタラクションを行うことができるインターフェースです。モーダルは [Block Kit](https://api.slack.com/block-kit) の視覚的でインタラクティブなコンポーネントを使って構成されます。 +[モーダル](https://docs.slack.dev/surfaces/modals)は、ユーザからデータを収集したり、動的でインタラクティブな表示を見せることに特化したインターフェースです。モーダルは Slack 内でユーザがアプリとの端的でありながらも深いインタラクションを行うことができるインターフェースです。モーダルは [Block Kit](https://docs.slack.dev/block-kit/) の視覚的でインタラクティブなコンポーネントを使って構成されます。 ### Slack アプリの設定 @@ -20,18 +20,18 @@ lang: ja #### `"block_actions"` リクエスト -ユーザーがモーダル内の[インタラクティブなコンポーネント](https://api.slack.com/reference/block-kit/interactive-components)を使用して何かアクションを起こしたとき、アプリは [`"block_actions"` という type のペイロード](https://api.slack.com/reference/interaction-payloads/block-actions)を受信します。このリクエストを処理するためにやらなければならないことは以下の通りです。 +ユーザーがモーダル内の[インタラクティブなコンポーネント](https://docs.slack.dev/block-kit/#making-things-interactive)を使用して何かアクションを起こしたとき、アプリは [`"block_actions"` という type のペイロード](https://docs.slack.dev/reference/interaction-payloads/block_actions-payload)を受信します。このリクエストを処理するためにやらなければならないことは以下の通りです。 -1. Slack API からのリクエストを[検証](https://api.slack.com/docs/verifying-requests-from-slack) +1. Slack API からのリクエストを[検証](https://docs.slack.dev/authentication/verifying-requests-from-slack) 1. リクエストボディをパースして `type` が `"block_actions"` かつ `action_id` が処理対象か確認 -1. [views.* API](https://api.slack.com/methods/views.update) を使って[書き換えたり、上に新しく追加したり](https://api.slack.com/surfaces/modals/using#modifying)する and/or 必要に応じて送信された情報を [private_metadata](https://api.slack.com/surfaces/modals/using#carrying_data_between_views) に保持 +1. [views.* API](https://docs.slack.dev/reference/methods/views.update) を使って[書き換えたり、上に新しく追加したり](https://docs.slack.dev/surfaces/modals)する and/or 必要に応じて送信された情報を [private_metadata](https://docs.slack.dev/surfaces/modals#private_metadata) に保持 1. 受け取ったことを伝えるために Slack API へ 200 OK 応答 #### `"view_submission"` リクエスト -ユーザーがモーダル最下部の Submit ボタンを押してフォームの送信を行ったとき、[`"view_submission"` という type のペイロード](https://api.slack.com/reference/interaction-payloads/views#view_submission)を受信します。このリクエストを処理するためにやらなければならないことは以下の通りです。 +ユーザーがモーダル最下部の Submit ボタンを押してフォームの送信を行ったとき、[`"view_submission"` という type のペイロード](https://docs.slack.dev/reference/interaction-payloads/view-interactions-payload#view_submission)を受信します。このリクエストを処理するためにやらなければならないことは以下の通りです。 -1. Slack API からのリクエストを[検証](https://api.slack.com/docs/verifying-requests-from-slack) +1. Slack API からのリクエストを[検証](https://docs.slack.dev/authentication/verifying-requests-from-slack) 1. リクエストボディをパースして `type` が `"view_submission"` かつ `callback_id` が処理対象かを確認 1. `view.state.values` からフォーム送信された情報を抽出 1. 入力バリデーション、データベースへの保存、外部サービスとの連携など任意の処理 @@ -41,9 +41,9 @@ lang: ja #### `"view_closed"` リクエスト (`notify_on_close` が `true` のときのみ) -ユーザーがモーダルの Cancel ボタンや x ボタンを押したとき、[`"view_closed"` という type のペイロード](https://api.slack.com/reference/interaction-payloads/views#view_closed) を受信する場合があります。これらのボタンは blocks ではなく、標準で配置されているものです。このリクエストを受信するためには [views.open](https://api.slack.com/methods/views.open) や [views.push](https://api.slack.com/methods/views.push) の API メソッドでモーダルを生成したときに `notify_on_close` を `true` に設定しておく必要があります。このリクエストを処理するためにやらなければならないことは以下の通りです。 +ユーザーがモーダルの Cancel ボタンや x ボタンを押したとき、[`"view_closed"` という type のペイロード](https://docs.slack.dev/reference/interaction-payloads/view-interactions-payload#view_closed) を受信する場合があります。これらのボタンは blocks ではなく、標準で配置されているものです。このリクエストを受信するためには [views.open](https://docs.slack.dev/reference/methods/views.open) や [views.push](https://docs.slack.dev/reference/methods/views.push) の API メソッドでモーダルを生成したときに `notify_on_close` を `true` に設定しておく必要があります。このリクエストを処理するためにやらなければならないことは以下の通りです。 -1. Slack API からのリクエストを[検証](https://api.slack.com/docs/verifying-requests-from-slack) +1. Slack API からのリクエストを[検証](https://docs.slack.dev/authentication/verifying-requests-from-slack) 1. リクエストボディをパースして `type` が `"view_closed"` かつ `callback_id` が処理対象かを確認 1. 任意のこのタイミングでやるべきこと 1. 受け取ったことを伝えるために Slack API へ 200 OK 応答 @@ -58,7 +58,7 @@ lang: ja * モーダルを特定するには `callback_id` を使用し、`view.states` 内で入力値を特定するには `block_id` と `action_id` のペアを使用します * モーダルの内部状態や `"block_actions"` での入力結果は `view.private_metadata` に保持することができます * `"view_submission"` のリクエストは、その応答 (= `ack()`) で `response_action` を指定することでモーダルの次の状態を指示します -* [views.update](https://api.slack.com/methods/views.update)、[views.push](https://api.slack.com/methods/views.push) API メソッドはモーダル内での `"block_actions"` リクエストを受信したときに使用するものであり、`"view_submission"` 時にモーダルを操作するための API ではありません +* [views.update](https://docs.slack.dev/reference/methods/views.update)、[views.push](https://docs.slack.dev/reference/methods/views.push) API メソッドはモーダル内での `"block_actions"` リクエストを受信したときに使用するものであり、`"view_submission"` 時にモーダルを操作するための API ではありません --- ## コード例 @@ -431,9 +431,9 @@ ctx.ackWithPush(newViewInStack) `view_submission` のペイロードはデフォルトでは `response_url` を含んでいません。しかし、モーダルがユーザーにメッセージを投稿するためのチャンネルを入力するよう求める `input` タイプのブロックを含む場合、ペイロード内の `response_urls` (Java では `List responseUrls` となります) として URL を受け取ることができます。 -これを有効にするためには [`channels_select`](https://api.slack.com/reference/block-kit/block-elements#channel_select) もしくは [`conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_select) のタイプのブロックエレメントを配置し、さらにその属性として `"response_url_enabled": true` を追加してください。より詳細な情報は [API ドキュメント(英語)](https://api.slack.com/surfaces/modals/using#modal_response_url)を参照してください。 +これを有効にするためには [`channels_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#channel_multi_select) もしくは [`conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#conversation_multi_select) のタイプのブロックエレメントを配置し、さらにその属性として `"response_url_enabled": true` を追加してください。より詳細な情報は [API ドキュメント(英語)](https://docs.slack.dev/surfaces/modals#modal_response_url)を参照してください。 -また、ユーザーがモーダルを開いたときに見ていたチャンネルや DM を `initial_conversation(s)` として自動的に反映したい場合は [`conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_select) / [`multi_conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_multi_select) エレメントの `default_to_current_conversation` を有効にしてください。 +また、ユーザーがモーダルを開いたときに見ていたチャンネルや DM を `initial_conversation(s)` として自動的に反映したい場合は [`conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#conversation_multi_select) / [`multi_conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element) エレメントの `default_to_current_conversation` を有効にしてください。 ```java import static com.slack.api.model.block.Blocks.*; @@ -502,7 +502,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Slack API からのリクエストを検証 - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // "X-Slack-Signature" header, "X-Slack-Request-Timestamp" ヘッダーとリクエストボディを検証 if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/rtm.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/rtm.md index 2407745e2..c883209df 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/rtm.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/rtm.md @@ -4,7 +4,7 @@ lang: ja # Real Time Messaging (RTM) -[Real Time Messaging API](https://api.slack.com/rtm) は Slack からリアルタイムでイベントを受信したり、ユーザとしてメッセージを送信するための WebSocket ベースの API です。単に "RTM API” と呼ばれることもあります。 +[Real Time Messaging API](https://docs.slack.dev/legacy/legacy-rtm-api) は Slack からリアルタイムでイベントを受信したり、ユーザとしてメッセージを送信するための WebSocket ベースの API です。単に "RTM API” と呼ばれることもあります。 **注**: RTM API は最新の権限(Granular Permissions)を持ったアプリでは利用できません。移行先として [Events API](/guides/events-api) や [Web API](/guides/web-api-basics) を利用することを推奨します。ファイヤーウォールなどの制約により、止むを得ず RTM API を使う必要がある場合は、[この URL](https://api.slack.com/apps?new_classic_app=1) から Classic Permissions の Slack アプリをつくれば、新規のアプリでも引き続き RTM を利用できます。もし既存の RTM に依存したアプリを使っている場合、そのアプリの権限管理を新しい方式に移行すると RTM を使えなくなりますので注意してください。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/scim-api.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/scim-api.md index 1f423ed1f..d6660c704 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/scim-api.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/scim-api.md @@ -4,11 +4,11 @@ lang: ja # SCIM API -[SCIM API](https://api.slack.com/scim) は、ユーザアカウントやグループのプロビジョニングのための API 群です。SCIM は、Slack を含む複数のサービス・ツールを横断してユーザアカウントの管理を行うために Single Sign-on (SSO) サービスや ID プロバイダーによって利用されます。 +[SCIM API](https://docs.slack.dev/admins/scim-api) は、ユーザアカウントやグループのプロビジョニングのための API 群です。SCIM は、Slack を含む複数のサービス・ツールを横断してユーザアカウントの管理を行うために Single Sign-on (SSO) サービスや ID プロバイダーによって利用されます。 [SCIM (System for Cross-domain Identity Management)](http://www.simplecloud.info/) は、数多くのサービスでサポートされている仕様です。それに準拠するこの API は他の Slack API とは若干異なるふるまいをします。 -詳細は「[SCIM API(英語)](https://api.slack.com/scim)」を確認してください。 +詳細は「[SCIM API(英語)](https://docs.slack.dev/admins/scim-api)」を確認してください。 --- ## SCIM API を Java で使う @@ -58,7 +58,7 @@ newUser.getName().setFamilyName("Sera"); UsersCreateResponse creation = slack.scim(token).createUser(req -> req.user(newUser)); // ユーザー検索でフィルター条件を持つクエリを実行 -// https://api.slack.com/scim#filter +// https://docs.slack.dev/admins/scim-api UsersSearchResponse searchResp = slack.scim(token).searchUsers(req -> req .count(1) .filter("userName eq \"" + userName + "\"") @@ -122,7 +122,7 @@ try { --- ## Rate Limits -Slack の SCIM API は、期待通りの快適なユーザー体験を提供するために、その [Rate Limits](https://api.slack.com/docs/rate-limits) に依拠しています。この制限は他の Slack API の制限とは異なり、アプリ単位ではなく、一つの OrG に設定されている全ての SCIM API 利用アプリ全体に対して適用されることにご注意ください。詳細は [API ドキュメント](https://api.slack.com/admins/scim#ratelimits)を参考にしてください。 +Slack の SCIM API は、期待通りの快適なユーザー体験を提供するために、その [Rate Limits](https://docs.slack.dev/apis/web-api/rate-limits) に依拠しています。この制限は他の Slack API の制限とは異なり、アプリ単位ではなく、一つの OrG に設定されている全ての SCIM API 利用アプリ全体に対して適用されることにご注意ください。詳細は [API ドキュメント](https://docs.slack.dev/admins/scim-api#limitations)を参考にしてください。 **AsyncSCIMClient** (非同期クライアント)はその実行において Rate Limits を考慮します。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/shortcuts.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/shortcuts.md index b9bf36b1f..b5e289d81 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/shortcuts.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/shortcuts.md @@ -4,7 +4,7 @@ lang: ja # ショートカット -[ショートカット](https://api.slack.com/interactivity/shortcuts)は、クイックスイッチャーから呼び出すことのできるスラッシュコマンドの進化形です。ユーザーは Slack 内の直感的なサーフェスエリアであなたのアプリのワークフローを起動することができるようになります。 +[ショートカット](https://docs.slack.dev/interactivity/implementing-shortcuts)は、クイックスイッチャーから呼び出すことのできるスラッシュコマンドの進化形です。ユーザーは Slack 内の直感的なサーフェスエリアであなたのアプリのワークフローを起動することができるようになります。 Slack アプリは 3 秒以内に `ack()` メソッドでショッートカット実行のリクエストに対して応答をする必要があります。 @@ -27,7 +27,7 @@ Slack アプリは 3 秒以内に `ack()` メソッドでショッートカッ Bolt アプリがショートカットへの応答のためにやらなければならないことは以下の通りです。 -1. Slack API からのリクエストを[検証](https://api.slack.com/docs/verifying-requests-from-slack) +1. Slack API からのリクエストを[検証](https://docs.slack.dev/authentication/verifying-requests-from-slack) 1. リクエストボディをパースして `callback_id` が処理対象か確認 1. 返信メッセージを組み立てるなどメインの処理を実行 1. 受け取ったことを伝えるために Slack API へ 200 OK 応答 @@ -44,7 +44,7 @@ Bolt は Slack アプリに必要な共通処理の多くを巻き取ります メッセージショートカットのペイロードは `response_url` を持っており、例えば `ack()` した後、しばらく経ってからでも返信することができます。URL は発行されてから 30 分間を期限に最大 5 回まで使用することができます。処理が終わったタイミングで `response_url` を使って返信する場合は `ctx.ack()` は引数なしで実行し `ctx.respond()` でメッセージを投稿する、というやり方になります。グローバルショートカットのペイロードには `response_url` は含まれません。 -グローバルショートカットのペイロードは、デフォルトでは `response_url` を持っていません。しかし、モーダルの中にユーザーにチャンネルを入力してもらうための `input` タイプのブロックがある場合は `response_urls` という項目で受け取ることができます。これを利用するためには [`channels_select`](https://api.slack.com/reference/block-kit/block-elements#channel_select) か [`conversations_select`](https://api.slack.com/reference/block-kit/block-elements#conversation_select) の input type の block element を用意し、かつ、その属性に `"response_url_enabled": true` を設定してください。 +グローバルショートカットのペイロードは、デフォルトでは `response_url` を持っていません。しかし、モーダルの中にユーザーにチャンネルを入力してもらうための `input` タイプのブロックがある場合は `response_urls` という項目で受け取ることができます。これを利用するためには [`channels_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#channel_multi_select) か [`conversations_select`](https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#conversation_multi_select) の input type の block element を用意し、かつ、その属性に `"response_url_enabled": true` を設定してください。 以下のサンプルは、ショートカットのリクエストに応答する Bolt アプリの実装の例です。 @@ -133,7 +133,7 @@ import com.slack.api.util.json.GsonFactory; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Slack からのリクエストを検証 - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // "X-Slack-Signature" header, "X-Slack-Request-Timestamp" ヘッダーとリクエストボディを検証 if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/sign-in-with-slack.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/sign-in-with-slack.md index c7456ad49..a21091ff1 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/sign-in-with-slack.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/sign-in-with-slack.md @@ -4,7 +4,7 @@ lang: ja # Slack でログインする (OpenID Connect) -[Slack でログインする (Sign in with Slack)](https://api.slack.com/authentication/sign-in-with-slack)という機能は、ユーザーが Slack アカウントを使って他のサービスにログインすることに役立ちます。このプラットフォーム機能は、標準の [OpenID Connect](https://openid.net/connect/) の仕様と互換性を持つように最近アップグレードされました。Bolt for Java の 1.10 以上のバージョンであれば、この認証フローを非常に簡単に実装することができます。 +[Slack でログインする (Sign in with Slack)](https://docs.slack.dev/authentication/sign-in-with-slack/)という機能は、ユーザーが Slack アカウントを使って他のサービスにログインすることに役立ちます。このプラットフォーム機能は、標準の [OpenID Connect](https://openid.net/connect/) の仕様と互換性を持つように最近アップグレードされました。Bolt for Java の 1.10 以上のバージョンであれば、この認証フローを非常に簡単に実装することができます。 ### Slack アプリの設定 @@ -94,7 +94,7 @@ SlackAppServer server = new SlackAppServer(apps); server.start(); ``` -もし、[トークンローテーション(英語)](https://api.slack.com/authentication/rotation)の機能も同時に有効にする場合、コードは以下のようになるでしょう: +もし、[トークンローテーション(英語)](https://docs.slack.dev/authentication/using-token-rotation)の機能も同時に有効にする場合、コードは以下のようになるでしょう: ```java // このコールバック関数で OpenID Connect の code authorization フローをハンドリングできる diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/slash-commands.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/slash-commands.md index 14e07234e..1003e489f 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/slash-commands.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/slash-commands.md @@ -4,7 +4,7 @@ lang: ja # スラッシュコマンド -[スラッシュコマンド](https://api.slack.com/interactivity/slash-commands) は、メッセージ投稿フォームからアプリの機能を呼び出すことができる機能です。 +[スラッシュコマンド](https://docs.slack.dev/interactivity/implementing-slash-commands) は、メッセージ投稿フォームからアプリの機能を呼び出すことができる機能です。 スラッシュコマンドの実行への応答は、とてもよくあるユースケースです。Bolt アプリは Slack API サーバーからのリクエストに対して 3 秒以内に `ack()` メソッドで応答する必要があります。3 秒以内に応答しなかった場合、コマンドを実行したユーザーに対して Slack 上でタイムアウトした旨が通知されます。 @@ -23,7 +23,7 @@ lang: ja Bolt アプリがスラッシュコマンドの実行を処理するためにやらなければならないことは以下の通りです。 -1. Slack API からのリクエストを[検証](https://api.slack.com/docs/verifying-requests-from-slack) +1. Slack API からのリクエストを[検証](https://docs.slack.dev/authentication/verifying-requests-from-slack) 1. リクエストボディをパースして `command` が処理対象か確認 1. 返信メッセージを組み立てるなどメインの処理を実行 1. 受け取ったことを伝えるために Slack API へ 200 OK 応答 @@ -83,7 +83,7 @@ app.command("/echo") { req, ctx -> } ``` -この SDK で [Block Kit](https://api.slack.com/block-kit) を使ったメッセージを組み立てる方法は「[メッセージの組み立て方](/guides/composing-messages)」を参考にしてください。 +この SDK で [Block Kit](https://docs.slack.dev/block-kit/) を使ったメッセージを組み立てる方法は「[メッセージの組み立て方](/guides/composing-messages)」を参考にしてください。 ### Bolt がやっていること @@ -98,7 +98,7 @@ import com.slack.api.app_backend.slash_commands.payload.SlashCommandPayload; PseudoHttpResponse handle(PseudoHttpRequest request) { // 1. Slack からのリクエストを検証 - // https://api.slack.com/docs/verifying-requests-from-slack + // https://docs.slack.dev/authentication/verifying-requests-from-slack // "X-Slack-Signature" header, "X-Slack-Request-Timestamp" ヘッダーとリクエストボディを検証 if (!PseudoSlackRequestVerifier.isValid(request)) { return PseudoHttpResponse.builder().status(401).build(); diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/socket-mode.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/socket-mode.md index aa45516b2..83ae32f72 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/socket-mode.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/socket-mode.md @@ -4,14 +4,14 @@ lang: ja # ソケットモード -[ソケットモード](https://api.slack.com/apis/connections/socket)では、Slack からのペイロードを受け付ける Web エンドポイントを提供するサーバーを構築する代わりに Slack と WebSocket のコネクション経由でやりとりすることができるようになります。この SDK では、バージョン 1.5 から提供されている **bolt-socket-mode** という Bolt の拡張を利用することで、ソケットモードを有効にしたアプリを開発することができます。 +[ソケットモード](https://docs.slack.dev/apis/events-api/using-socket-mode)では、Slack からのペイロードを受け付ける Web エンドポイントを提供するサーバーを構築する代わりに Slack と WebSocket のコネクション経由でやりとりすることができるようになります。この SDK では、バージョン 1.5 から提供されている **bolt-socket-mode** という Bolt の拡張を利用することで、ソケットモードを有効にしたアプリを開発することができます。 ### Slack アプリの設定 ソケットモードを有効にするには、[Slack アプリ管理画面](http://api.slack.com/apps)にアクセスし、開発中のアプリを選択、左ペインの **Settings** へ遷移します。この画面でいくつかやることがあります。 * **Settings** > **Basic Information** へ遷移 - * **App-Level Token** に [`connections:write`](https://api.slack.com/scopes/connections:write) スコープが付与されたものを一つ追加 + * **App-Level Token** に [`connections:write`](https://docs.slack.dev/reference/scopes/connections.write) スコープが付与されたものを一つ追加 * この `xapp-` から始まるトークンの値を取得してアプリで利用 * **Settings** > **Socket Mode** へ遷移 * **Enable Socket Mode** を Off から On にする diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/status-api.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/status-api.md index b3c1b968f..7964e99d2 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/status-api.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/status-api.md @@ -4,7 +4,7 @@ lang: ja # ステータス API -[ステータス API](https://api.slack.com/docs/slack-status) は、Slack サービスの稼働状態の情報を提供する API です。何らかの障害、サービス停止、メンテナンスが発生した場合、影響のある Slack の機能、時系列での詳細なアップデートなど、発生している問題に関する全ての情報が反映されます。 +[ステータス API](https://docs.slack.dev/reference/slack-status-api) は、Slack サービスの稼働状態の情報を提供する API です。何らかの障害、サービス停止、メンテナンスが発生した場合、影響のある Slack の機能、時系列での詳細なアップデートなど、発生している問題に関する全ての情報が反映されます。 --- ## Java での利用 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/steps-from-apps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/steps-from-apps.md index d812557b8..7495998da 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/steps-from-apps.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/steps-from-apps.md @@ -4,9 +4,9 @@ lang: ja # ワークフローステップ(非推奨) -**ここで紹介されているワークフローステップの実装方法は非推奨となりました。 今後は[新しい方式(英語)](https://api.slack.com/automation/functions/custom-bolt)を利用してください。** +**ここで紹介されているワークフローステップの実装方法は非推奨となりました。 今後は[新しい方式(英語)](https://docs.slack.dev/workflows/workflow-steps)を利用してください。** -(アプリによる)ワークフローステップ(Workflow Steps from Apps) は、[ワークフロービルダー](https://api.slack.com/workflows)におけるワークフローに組み込み可能なカスタムのワークフローステップを任意の Slack アプリが提供することを可能とします。 +(アプリによる)ワークフローステップ(Workflow Steps from Apps) は、[ワークフロービルダー](https://docs.slack.dev/legacy/legacy-steps-from-apps/)におけるワークフローに組み込み可能なカスタムのワークフローステップを任意の Slack アプリが提供することを可能とします。 ワークフローステップは、三つの異なるユーザーイベントから構成されます: @@ -16,7 +16,7 @@ lang: ja ワークフローステップを機能させるためには、これら三つのイベント全てを適切にハンドリングする必要があります。 -ワークフローステップのさらなる詳細については [API ドキュメント](https://api.slack.com/workflows/steps)を参考にしてください。 +ワークフローステップのさらなる詳細については [API ドキュメント](https://docs.slack.dev/legacy/legacy-steps-from-apps/)を参考にしてください。 ### Slack アプリの設定 @@ -58,13 +58,13 @@ app.step(step); --- ## ステップの追加・編集 -ワークフローの作成者が、アプリが提供するステップをワークフローに追加(またはその設定を変更)するタイミングで、アプリは [`workflow_step_edit`](https://api.slack.com/reference/workflows/workflow_step_edit) というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `edit` コールバック関数が実行されます。 +ワークフローの作成者が、アプリが提供するステップをワークフローに追加(またはその設定を変更)するタイミングで、アプリは [`workflow_step_edit`](https://docs.slack.dev/legacy/legacy-steps-from-apps/legacy-steps-from-apps-workflow_step_edit-payload) というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `edit` コールバック関数が実行されます。 -このとき、ワークフロー作成・変更のどちらの場合でも、アプリは[ワークフローステップ設定のためのモーダル](https://api.slack.com/reference/workflows/configuration-view)を応答する必要があります。このモーダルは、ワークフローステップに固有の設定である必要があり、通常のモーダルにはない制約があります。最もわかりやすいものとしては、`title​`、`submit​`、`close` プロパティを設定することができません。また、デフォルトの設定では、この設定モーダルの `callback_id` はワークフローステップのものと同じものが使用されます。 +このとき、ワークフロー作成・変更のどちらの場合でも、アプリは[ワークフローステップ設定のためのモーダル](https://docs.slack.dev/legacy/legacy-steps-from-apps/legacy-steps-from-apps-configuration-view-object)を応答する必要があります。このモーダルは、ワークフローステップに固有の設定である必要があり、通常のモーダルにはない制約があります。最もわかりやすいものとしては、`title​`、`submit​`、`close` プロパティを設定することができません。また、デフォルトの設定では、この設定モーダルの `callback_id` はワークフローステップのものと同じものが使用されます。 `edit` コールバック関数の中では モーダルの view のうち `blocks` だけを渡すだけで簡単にステップ設定モーダルをオープンすることができる `configure()` というユーティリティ関数が利用できます。これは、必要な入力内容が揃うまで設定の保存を無効にする `submit_disabled` というオプションを `true` に設定します。 -設定モーダルを開く処理に関するさらなる詳細は、[ドキュメント](https://api.slack.com/workflows/steps#handle_config_view)を参考にしてください。 +設定モーダルを開く処理に関するさらなる詳細は、[ドキュメント](https://docs.slack.dev/legacy/legacy-steps-from-apps/legacy-steps-from-apps-configuration-view-object)を参考にしてください。 ```java import static com.slack.api.model.block.Blocks.*; @@ -113,7 +113,7 @@ app.step(step); - `step_name` は、デフォルトのステップ名を上書きするために使用します - `step_image_url` は、デフォルトのステップのイメージ画像を上書きするために使用します -これら引数をどのように構成するかの詳細は、[ドキュメント](https://api.slack.com/reference/workflows/workflow_step)を参考にしてください。 +これら引数をどのように構成するかの詳細は、[ドキュメント](https://docs.slack.dev/legacy/legacy-steps-from-apps/legacy-steps-from-apps-workflow_step-object)を参考にしてください。 ```java import java.util.*; @@ -150,7 +150,7 @@ app.step(step); --- ## ステップの実行 -ワークフローの利用者によって、アプリが提供するカスタムのワークフローステップが実行されるとき、アプリは[`workflow_step_execute`](https://api.slack.com/events/workflow_step_execute) というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `execute` コールバック関数が実行されます。 +ワークフローの利用者によって、アプリが提供するカスタムのワークフローステップが実行されるとき、アプリは[`workflow_step_execute`](https://docs.slack.dev/reference/events/workflow_step_execute) というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `execute` コールバック関数が実行されます。 `save` コールバック関数で予め規定された `inputs` の情報を使って、ここでの処理は、サードパーティの API を呼び出したり、データベースに情報を保存したり、そのユーザーのホームタブを更新したり、`outputs` オブジェクトを構築することで後続のワークフローステップが利用できる情報を設定したりします。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-basics.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-basics.md index 91927de44..77e8bf671 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-basics.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-basics.md @@ -27,22 +27,22 @@ Slack slack = Slack.getInstance(); |メソッド|戻り値の型|説明| |-|-|-| -|**Slack#methods(String)**|**com.slack.api.methods.MethodsClient**|[API メソッド](https://api.slack.com/methods)クライアント| -|**Slack#methodsAsync(String)**|**com.slack.api.methods.AsyncMethodsClient**|[Rate Limits](https://api.slack.com/docs/rate-limits) を十分に考慮した [API メソッド](https://api.slack.com/methods)非同期クライアント| -|**Slack#socketMode(String)**|**com.slack.api.socket_mode.SocketModeClient**|[ソケットモード](https://api.slack.com/apis/connections/socket) の WebSocket クライアント| -|**Slack#rtm(String)**|**com.slack.api.rtm.RTMClient**|[Real Time Messaging (RTM) API](https://api.slack.com/rtm) の WebSocket クライアント| -|**Slack#scim(String)**|**com.slack.api.scim.SCIMClient**|[SCIM API](https://api.slack.com/scim) クライアント| -|**Slack#audit(String)**|**com.slack.api.audit.AuditClient**|[Audit Logs API](https://api.slack.com/docs/audit-logs-api) クライアント| -|**Slack#status()**|**com.slack.api.status.v2.StatusClient**|[Slack Status API](https://api.slack.com/docs/slack-status) クライアント| +|**Slack#methods(String)**|**com.slack.api.methods.MethodsClient**|[API メソッド](https://docs.slack.dev/reference/methods)クライアント| +|**Slack#methodsAsync(String)**|**com.slack.api.methods.AsyncMethodsClient**|[Rate Limits](https://docs.slack.dev/apis/web-api/rate-limits) を十分に考慮した [API メソッド](https://docs.slack.dev/reference/methods)非同期クライアント| +|**Slack#socketMode(String)**|**com.slack.api.socket_mode.SocketModeClient**|[ソケットモード](https://docs.slack.dev/apis/events-api/using-socket-mode) の WebSocket クライアント| +|**Slack#rtm(String)**|**com.slack.api.rtm.RTMClient**|[Real Time Messaging (RTM) API](https://docs.slack.dev/legacy/legacy-rtm-api) の WebSocket クライアント| +|**Slack#scim(String)**|**com.slack.api.scim.SCIMClient**|[SCIM API](https://docs.slack.dev/admins/scim-api) クライアント| +|**Slack#audit(String)**|**com.slack.api.audit.AuditClient**|[Audit Logs API](https://docs.slack.dev/admins/audit-logs-api) クライアント| +|**Slack#status()**|**com.slack.api.status.v2.StatusClient**|[Slack Status API](https://docs.slack.dev/reference/slack-status-api) クライアント| -[Incoming Webhooks](https://api.slack.com/messaging/webhooks) の解説をお探しですか?もちろん、サポートされています![こちらのガイド](/guides/incoming-webhooks)を参考にしてください。 +[Incoming Webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks) の解説をお探しですか?もちろん、サポートされています![こちらのガイド](/guides/incoming-webhooks)を参考にしてください。 --- ## API メソッドを実行 -最も人気のある Slack の API メソッドは [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) という API で、これはチャンネルなどにメッセージを投稿するために使用されます。 +最も人気のある Slack の API メソッドは [**chat.postMessage**](https://docs.slack.dev/reference/methods/chat.postmessage) という API で、これはチャンネルなどにメッセージを投稿するために使用されます。 -[**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) のような API メソッドを実行するには **MethodsClient** をトークンを与えて初期化する必要があります。トークンは `xoxb-` (ボットトークン)や `xoxp-` (ユーザートークン)で始まる文字列です。これらのトークンは Slack アプリがインストールされたそれぞれのワークスペース毎に払い出されるものです。とりあえず始めるにあたっては、[Slack アプリの管理画面](https://api.slack.com/apps) から開発用ワークスペース(Development Workspace)のトークンを簡単に発行することができます。 +[**chat.postMessage**](https://docs.slack.dev/reference/methods/chat.postmessage) のような API メソッドを実行するには **MethodsClient** をトークンを与えて初期化する必要があります。トークンは `xoxb-` (ボットトークン)や `xoxp-` (ユーザートークン)で始まる文字列です。これらのトークンは Slack アプリがインストールされたそれぞれのワークスペース毎に払い出されるものです。とりあえず始めるにあたっては、[Slack アプリの管理画面](https://api.slack.com/apps) から開発用ワークスペース(Development Workspace)のトークンを簡単に発行することができます。 **注**: トークンをソースコードにハードコードすることは望ましくありません。意図しない流出を防ぐために、環境変数やそれに類するより安全な方法でトークンを保持することを強くおすすめします。 @@ -132,7 +132,7 @@ val response = slack.methods(token).chatPostMessage { it ### レスポンスの扱い -Slack Web API のレスポンス形式にまだ馴染みがなければ「[Evaluating responses(英語)](https://api.slack.com/web#responses)」を読んでみてください。すべての Web API レスポンスは JSON オブジェクトを持ち、そのトップレベルに真偽型の `"ok"` というリクエストの成功・失敗を伝えるためのプロパティがあります。 +Slack Web API のレスポンス形式にまだ馴染みがなければ「[Evaluating responses(英語)](https://docs.slack.dev/apis/web-api/#responses)」を読んでみてください。すべての Web API レスポンスは JSON オブジェクトを持ち、そのトップレベルに真偽型の `"ok"` というリクエストの成功・失敗を伝えるためのプロパティがあります。 ```json { @@ -165,11 +165,11 @@ if (response.isOk()) { API メソッドを呼び出すとき、様々な理由からエラーが発生することがあります。 -1. 成功のレスポンスを受け取っても、そのレスポンスボディの `"ok"` プロパティが **false** で `"error"` プロパティが `channel_not_found` のような値で設定されていることがあります。このエラーコードの意味・理由は [API メソッドのドキュメント](https://api.slack.com/methods)で確認できます。 +1. 成功のレスポンスを受け取っても、そのレスポンスボディの `"ok"` プロパティが **false** で `"error"` プロパティが `channel_not_found` のような値で設定されていることがあります。このエラーコードの意味・理由は [API メソッドのドキュメント](https://docs.slack.dev/reference/methods)で確認できます。 2. ネットワーク・Slack API サーバーとの接続の問題で **java.io.IOException** が throw されることがあります。 3. Slack API サーバーから 20x 以外の HTTP ステータスで応答された場合に **com.slack.api.methods.SlackApiException** が throw されることがあります。 -**1.** のパターンをどう処理するかを理解するには、[このドキュメント(英語)](https://api.slack.com/web#evaluating_responses)を参考にしてください。 +**1.** のパターンをどう処理するかを理解するには、[このドキュメント(英語)](https://docs.slack.dev/apis/web-api/#responses)を参考にしてください。 **2.** と **3.** のパターンでは **MethodsClient** は 2 種類の例外を throw する可能性があります。この API クライアントを利用するアプリケーション側で、これらの例外を catch して適切に処理する必要があります。 @@ -203,7 +203,7 @@ try { --- ## 他の API メソッド -Slack Web API は [180 以上の API メソッド](https://api.slack.com/methods)を提供しています。他の API メソッドを使うやり方もほぼ同じです。**MethodsClient** のメソッドを正しいトークンと必要なパラメータを指定して呼び出します。 +Slack Web API は [180 以上の API メソッド](https://docs.slack.dev/reference/methods)を提供しています。他の API メソッドを使うやり方もほぼ同じです。**MethodsClient** のメソッドを正しいトークンと必要なパラメータを指定して呼び出します。 この SDK でサポートされている Java メソッドの一覧にアクセスするには [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/com/slack/api/methods/MethodsClient.html) を参照するとよいでしょう。 @@ -239,7 +239,7 @@ AwesomeMethodResponse response = slack.methods().postFormWithTokenAndParseRespon --- ## Rate Limits -Slack プラットフォームの機能・API は、期待通りの快適なユーザー体験を提供するために、その [Rate Limits](https://api.slack.com/docs/rate-limits) に依拠しています。この制限は **"per app per workspace"**(Slack アプリ毎、かつ、それがインストールされたワークスペース毎)で適用されます。それぞれの API は、どれくらいの頻度で呼び出せるかを規定する "Tier" が設定されています。**slack-api-client** はこの Tier の完全なサポートを提供しており、**AsyncMethodsClient** (非同期クライアント)はその実行において Rate Limits を考慮します。 +Slack プラットフォームの機能・API は、期待通りの快適なユーザー体験を提供するために、その [Rate Limits](https://docs.slack.dev/apis/web-api/rate-limits) に依拠しています。この制限は **"per app per workspace"**(Slack アプリ毎、かつ、それがインストールされたワークスペース毎)で適用されます。それぞれの API は、どれくらいの頻度で呼び出せるかを規定する "Tier" が設定されています。**slack-api-client** はこの Tier の完全なサポートを提供しており、**AsyncMethodsClient** (非同期クライアント)はその実行において Rate Limits を考慮します。 非同期クライアントは、可能な限りバーストリクエストを発生させないために、内部にキューの仕組みを持っています。一方、**MethodsClient** (同期クライアント)はそのような考慮はなく、常に即時でリクエストを送信します。幸いにもこれらの同期・非同期クライアントは協調して **MetricsDatastore** 内のメトリクスを更新します。これにより、非同期クライアントは、今どれくらいのトラフックを Slack プラットフォームに送っているかを正確に把握し、残っている呼び出し量を推測することができます。 diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-for-admins.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-for-admins.md index e01cadd21..44eeeb2b8 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-for-admins.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/guides/web-api-for-admins.md @@ -4,7 +4,7 @@ lang: ja # OrG 管理者向け API -Slack の [API メソッド](https://api.slack.com/methods) のうち、一部のメソッド名は **`admin.`** から始まっています。ご存知かもしれませんが、これらの API は全ての開発者向けのものではありません。これらは [Enterprise Grid](https://api.slack.com/enterprise/grid) の [OrG](https://slack.com/intl/ja-jp/help/articles/360004150931) 管理者が利用するための API 群です。 +Slack の [API メソッド](https://docs.slack.dev/reference/methods) のうち、一部のメソッド名は **`admin.`** から始まっています。ご存知かもしれませんが、これらの API は全ての開発者向けのものではありません。これらは [Enterprise Grid](https://docs.slack.dev/enterprise-grid/) の [OrG](https://slack.com/intl/ja-jp/help/articles/360004150931) 管理者が利用するための API 群です。 --- ## OrG 管理者向け API の呼び出し @@ -36,4 +36,4 @@ AdminAppsApprovedListResponse response = slack.methods(orgAdminToken).adminAppsA // まだまだたくさんあります...! ``` -網羅的な管理系 API の一覧は[こちら](https://api.slack.com/admins)で確認することができます。また、この SDK の [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/com/slack/api/methods/MethodsClient.html) にアクセスして、ページ内検索で **`admin`** で始まるものを探すのもよいでしょう。 \ No newline at end of file +網羅的な管理系 API の一覧は[こちら](https://docs.slack.dev/admins/)で確認することができます。また、この SDK の [Javadoc](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/com/slack/api/methods/MethodsClient.html) にアクセスして、ページ内検索で **`admin`** で始まるものを探すのもよいでしょう。 \ No newline at end of file diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md index ac62d6036..cfea2e9ea 100644 --- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md @@ -28,7 +28,7 @@ | groupId:artifactId |Description| |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| -| [`com.slack.api:slack-api-model`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-model) [📖](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/index.html#package) |チャンネル、メッセージ、ユーザー、Block Kit のブロックとそれによって構成されるサーフェスエリアなど [Slack の核となるような重要なオブジェクト(英語)](https://api.slack.com/types)を表現するクラス群を提供します。| +| [`com.slack.api:slack-api-model`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-model) [📖](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model/sdkLatestVersion/slack-api-model-sdkLatestVersion-javadoc.jar/!/index.html#package) |チャンネル、メッセージ、ユーザー、Block Kit のブロックとそれによって構成されるサーフェスエリアなど [Slack の核となるような重要なオブジェクト(英語)](https://docs.slack.dev/reference/objects)を表現するクラス群を提供します。| | [`com.slack.api:slack-api-model-kotlin-extension`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-model-kotlin-extension) [📖](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-model-kotlin-extension/sdkLatestVersion/slack-api-model-kotlin-extension-sdkLatestVersion-javadoc.jar/!/index.html#package) |Block Kit のデータ構造を Kotlin ネイティブな DSL を使って構築できるビルダーのモジュールを提供します。| | [`com.slack.api:slack-api-client`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-client) [📖](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client/sdkLatestVersion/slack-api-client-sdkLatestVersion-javadoc.jar/!/index.html#package) |様々な Slack API クライアントを提供します。サポートされているのは、API メソッド、ソケットモード、RTM API、SCIM API、Audit Logs API、ステータス API です。| | [`com.slack.api:slack-api-client-kotlin-extension`](https://search.maven.org/search?q=g:com.slack.api%20AND%20a:slack-api-client-kotlin-extension) [📖](https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/slack-api-client-kotlin-extension/sdkLatestVersion/slack-api-client-kotlin-extension-sdkLatestVersion-javadoc.jar/!/index.html#package) |Slack API クライアントのリクエストビルダーのメソッドを拡張することで、Block Kit のデータ構造を構築するための Kotlin ネイティブな DSL を直接利用できるようにするモジュールを提供します。| diff --git a/docs/navbarConfig.js b/docs/navbarConfig.js index 122867f08..b5e5224e8 100644 --- a/docs/navbarConfig.js +++ b/docs/navbarConfig.js @@ -61,7 +61,7 @@ const navbar = { target: '_self', }, { - to: 'https://api.slack.com', + to: 'https://docs.slack.dev', label: 'API Docs', position: 'right', target: '_self', diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 65b7c372b..8a0fa6ca2 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -338,7 +338,7 @@ a code { color: var(--code-link-text); } -a[href^="https://api.slack.com/methods"] > code +a[href^="https://docs.slack.dev/reference/methods"] > code { background-color: var(--method-link-background); color: var(--method-link-text); @@ -350,7 +350,7 @@ a[href^="/reference/methods"] > code color: var(--method-link-text); } -a[href^="https://api.slack.com/scopes"] > code +a[href^="https://docs.slack.dev/reference/scopes"] > code { background-color: var(--scope-link-background); color: var(--scope-link-text); @@ -362,7 +362,7 @@ a[href^="/reference/scopes"] > code color: var(--scope-link-text); } -a[href^="https://api.slack.com/events"] > code +a[href^="https://docs.slack.dev/reference/events"] > code { background-color: var(--event-link-background); color: var(--event-link-text);