Skip to content

Commit 53b62e8

Browse files
lukegalbraithrussellClaude
andcommitted
docs: fix code accuracy issues in English and Japanese guides
Reviewed all documentation guides against the source code and fixed inaccuracies in code examples, broken links, and typos across both English and Japanese docs. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 5803580 commit 53b62e8

32 files changed

Lines changed: 60 additions & 62 deletions

docs/english/guides/ai-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public class AssistantSimpleApp {
279279
}
280280
});
281281

282-
app.use(assistant);
282+
app.assistant(assistant);
283283

284284
app.event(MessageEvent.class, (req, ctx) -> {
285285
return ctx.ack();

docs/english/guides/app-distribution.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A newly created Slack app can only be installed in its development workspace in
1111

1212
### Slack app configuration
1313

14-
To enable App Distribution, visit the [Slack app settings page](http://api.slack.com/apps), choose the app you're working on, go to **Settings** > **Manage Distribution** on the left pane, and follow the instructions there.
14+
To enable App Distribution, visit the [Slack app settings page](https://api.slack.com/apps), choose the app you're working on, go to **Settings** > **Manage Distribution** on the left pane, and follow the instructions there.
1515

1616
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.
1717

@@ -40,7 +40,6 @@ import com.slack.api.bolt.App;
4040
import com.slack.api.bolt.jetty.SlackAppServer;
4141
import java.util.HashMap;
4242
import java.util.Map;
43-
import static java.util.Map.entry;
4443

4544
// API Request Handler App
4645
// expected env variables:
@@ -58,10 +57,10 @@ apiApp.command("/hi", (req, ctx) -> {
5857
App oauthApp = new App().asOAuthApp(true);
5958

6059
// Mount the two apps with their root path
61-
SlackAppServer server = new SlackAppServer(new HashMap<>(Map.ofEntries(
62-
entry("/slack/events", apiApp), // POST /slack/events (incoming API requests from the Slack Platform)
63-
entry("/slack/oauth", oauthApp) // GET /slack/oauth/start, /slack/oauth/callback (user access)
64-
)));
60+
Map<String, App> apps = new HashMap<>();
61+
apps.put("/slack/events", apiApp); // POST /slack/events (incoming API requests from the Slack Platform)
62+
apps.put("/slack/oauth", oauthApp); // GET /slack/oauth/start, /slack/oauth/callback (user access)
63+
SlackAppServer server = new SlackAppServer(apps);
6564

6665
server.start(); // http://localhost:3000
6766
```
@@ -107,7 +106,6 @@ import com.slack.api.bolt.service.builtin.AmazonS3OAuthStateService;
107106

108107
import java.util.HashMap;
109108
import java.util.Map;
110-
import static java.util.Map.entry;
111109

112110
// The standard AWS env variables are expected
113111
// export AWS_REGION=us-east-1
@@ -139,10 +137,10 @@ OAuthStateService stateService = new AmazonS3OAuthStateService(awsS3BucketName);
139137
oauthApp.service(stateService);
140138

141139
// Mount the two apps with their root path
142-
SlackAppServer server = new SlackAppServer(new HashMap<>(Map.ofEntries(
143-
entry("/slack/events", apiApp), // POST /slack/events (incoming API requests from the Slack Platform)
144-
entry("/slack/oauth", oauthApp) // GET /slack/oauth/start, /slack/oauth/callback (user access)
145-
)));
140+
Map<String, App> apps = new HashMap<>();
141+
apps.put("/slack/events", apiApp); // POST /slack/events (incoming API requests from the Slack Platform)
142+
apps.put("/slack/oauth", oauthApp); // GET /slack/oauth/start, /slack/oauth/callback (user access)
143+
SlackAppServer server = new SlackAppServer(apps);
146144

147145
server.start(); // http://localhost:3000
148146
```
@@ -287,7 +285,7 @@ app.event(TokensRevokedEvent.class, app.defaultTokensRevokedEventHandler());
287285
app.event(AppUninstalledEvent.class, app.defaultAppUninstalledEventHandler());
288286
```
289287

290-
To enable your own custom `InstallationService` classes to work with the built-in event handlers, the classes need to implement the following methods in the [`InstallationService`](https://github.com/seratch/java-slack-sdk/blob/main/bolt/src/main/java/com/slack/api/bolt/service/InstallationService.java) interface:
288+
To enable your own custom `InstallationService` classes to work with the built-in event handlers, the classes need to implement the following methods in the [`InstallationService`](https://github.com/slackapi/java-slack-sdk/blob/main/bolt/src/main/java/com/slack/api/bolt/service/InstallationService.java) interface:
291289

292290
* `void deleteBot(Bot bot)`
293291
* `void deleteInstaller(Installer installer)`

docs/english/guides/app-home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ An [App Home](/surfaces/app-home) is a private, one-to-one space in Slack shared
88

99
### Slack app configuration
1010

11-
To enable Home tabs, visit the [Slack app settings page](http://api.slack.com/apps), choose the app you're working on, go to **Features** > **App Home** on the left pane, and then turn on **Home Tab**.
11+
To enable Home tabs, visit the [Slack app settings page](https://api.slack.com/apps), choose the app you're working on, go to **Features** > **App Home** on the left pane, and then turn on **Home Tab**.
1212

1313
To enable the Events API, go to **Features** > **Event Subscriptions** on the left pane. There are a few things to do on the page.
1414

docs/english/guides/audit-logs-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ lang: en
44

55
# Audit Logs API
66

7-
The [Audit Logs API](https://api.lack.com/docs/audit-logs-api) is used for monitoring what is happening in your [Enterprise Grid](/enterprise) organization.
7+
The [Audit Logs API](https://api.slack.com/docs/audit-logs-api) is used for monitoring what is happening in your [Enterprise Grid](/enterprise) organization.
88

99
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.
1010

@@ -20,7 +20,7 @@ import com.slack.api.Slack;
2020
import com.slack.api.audit.*;
2121

2222
Slack slack = Slack.getInstance();
23-
String token = System.getenv("SLACK_ADMIN_ACCESS_TOKN"); // `auditlogs:read` scope required
23+
String token = System.getenv("SLACK_ADMIN_ACCESS_TOKEN"); // `auditlogs:read` scope required
2424
AuditClient audit = slack.audit(token);
2525
```
2626

@@ -89,7 +89,7 @@ import com.slack.api.audit.*;
8989
import com.slack.api.audit.response.LogsResponse;
9090
import java.util.concurrent.CompletableFuture;
9191

92-
String token = System.getenv("SLACK_ADMIN_ACCESS_TOKN"); // `auditlogs:read` scope required
92+
String token = System.getenv("SLACK_ADMIN_ACCESS_TOKEN"); // `auditlogs:read` scope required
9393
AsyncAuditClient audit = Slack.getInstance().auditAsync(token);
9494

9595
CompletableFuture<LogsResponse> response = audit.getLogs(req -> req

docs/english/guides/events-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The [Events API](/apis/events-api/) is a streamlined way to build apps and bots
88

99
### Slack app configuration
1010

11-
To enable the Events API, visit the [Slack app settings page](http://api.slack.com/apps), choose the app you're working on, and go to **Features** > **Event Subscriptions** on the left pane. There are a few things to do on the page.
11+
To enable the Events API, visit the [Slack app settings page](https://api.slack.com/apps), choose the app you're working on, and go to **Features** > **Event Subscriptions** on the left pane. There are a few things to do on the page.
1212

1313
* Turn on **Enable Events**
1414
* Set the **Request URL** to `https://{your app's public URL domain}/slack/events` (this step is not required for Socket Mode apps)

docs/english/guides/getting-started-with-bolt.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ If instead you would prefer to use the `Java-WebSocket` implementation, swap its
6363
<dependency>
6464
<groupId>org.java-websocket</groupId>
6565
<artifactId>Java-WebSocket</artifactId>
66-
<version>1.5.1</version>
66+
<version>1.6.0</version>
6767
</dependency>
6868
```
6969

@@ -329,8 +329,8 @@ The default constructor expects the following two environment variables to exist
329329

330330
|Env Variable|Description|
331331
|-|-|
332-
|`SLACK_BOT_TOKEN`|The valid bot token value starting with `xoxb-` in your development workspace. To issue a bot token, install your Slack app that has a bot user to your development workspace. Visit the [Slack app settings 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`](/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.").<br/><br/> If you run an app that is installable for multiple workspaces, no need to specify this. Consult [App Distribution (OAuth)](/tools/java-slack-sdk/guides/app-distribution) for further information.|
333-
|`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 settings 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 [Verifying requests from Slack](/authentication/verifying-requests-from-slack) for more information.|
332+
|`SLACK_BOT_TOKEN`|The valid bot token value starting with `xoxb-` in your development workspace. To issue a bot token, install your Slack app that has a bot user to your development workspace. Visit the [Slack app settings page](https://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`](/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.").<br/><br/> If you run an app that is installable for multiple workspaces, no need to specify this. Consult [App Distribution (OAuth)](/tools/java-slack-sdk/guides/app-distribution) for further information.|
333+
|`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 settings page](https://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 [Verifying requests from Slack](/authentication/verifying-requests-from-slack) for more information.|
334334

335335
If you prefer configuring an `App` in a different way, write some code to initialize `AppConfig` on your own.
336336

docs/english/guides/incoming-webhooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ lang: en
88

99
### Slack app configuration
1010

11-
To enable this feature, visit the [Slack app settings page](http://api.slack.com/apps), choose the app you're working on, go to **Features** > **Incoming Webhooks** on the left pane, and then turn on **Activate Incoming Webhooks**.
11+
To enable this feature, visit the [Slack app settings page](https://api.slack.com/apps), choose the app you're working on, go to **Features** > **Incoming Webhooks** on the left pane, and then turn on **Activate Incoming Webhooks**.
1212

1313
Then, install the app to your development workspace. Each time your app is installed, a new webhook URL will be generated.
1414

docs/english/guides/interactive-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ See [Composing messages](/tools/java-slack-sdk/guides/composing-messages) to lea
1010

1111
### Slack app configuration
1212

13-
To enable interactive components, visit the [Slack app settings page](http://api.slack.com/apps), choose the app you're working on, and go to **Features** > **Interactivity & Shortcuts** on the left pane. There are three things to do on the page.
13+
To enable interactive components, visit the [Slack app settings page](https://api.slack.com/apps), choose the app you're working on, and go to **Features** > **Interactivity & Shortcuts** on the left pane. There are three things to do on the page.
1414

1515
* Turn on the feature
1616
* Set the **Request URL** to `https://{your app's public URL domain}/slack/events` (this step is not required for Socket Mode apps)

docs/english/guides/modals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ lang: en
88

99
## Slack app configuration
1010

11-
The first step to use modals in your app is to enable interactive components. Visit the [Slack app settings page](http://api.slack.com/apps), choose the app you're working on, and go to **Features** > **Interactivity & Shortcuts** on the left pane. There are three things to do on the page.
11+
The first step to use modals in your app is to enable interactive components. Visit the [Slack app settings page](https://api.slack.com/apps), choose the app you're working on, and go to **Features** > **Interactivity & Shortcuts** on the left pane. There are three things to do on the page.
1212

1313
* Turn on the feature
1414
* Set the **Request URL** to `https://{your app's public URL domain}/slack/events` (this step is not required for Socket Mode apps)

docs/english/guides/scim-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.slack.api.Slack;
2020
import com.slack.api.scim.*;
2121

2222
Slack slack = Slack.getInstance();
23-
String token = System.getenv("SLACK_ADMIN_ACCESS_TOKN"); // `admin` scope required
23+
String token = System.getenv("SLACK_ADMIN_ACCESS_TOKEN"); // `admin` scope required
2424
SCIMClient scim = slack.scim(token);
2525
```
2626

0 commit comments

Comments
 (0)