Skip to content

feat: add user_connections to the app manifest features model - #1662

Merged
WilliamBergamin merged 2 commits into
mainfrom
manifest-user-connections
Oct 23, 2026
Merged

WilliamBergamin merged 2 commits into
mainfrom
manifest-user-connections

Conversation

@WilliamBergamin

@WilliamBergamin WilliamBergamin commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

This pull request adds the features.user_connections manifest property (is_enabled, auth_hosts) to both manifest models, so apps that opt into standardized app authentication can pass it to apps.manifest.create, update and validate, and apps.manifest.export keeps it instead of dropping it.

Testing

With a configuration token, create an app whose manifest enables user connections, then export it. Slack requires the user_connection and user_connection_status_requested event subscriptions, and an interactivity request URL or Socket Mode:

AppManifestParams manifest = AppManifestParams.builder()
        .displayInformation(AppManifestParams.DisplayInformation.builder().name("connector").build())
        .features(AppManifestParams.Features.builder()
                .botUser(AppManifestParams.BotUser.builder().displayName("connector").build())
                .userConnections(AppManifestParams.UserConnections.builder()
                        .isEnabled(true)
                        .authHosts(Arrays.asList("example.com"))
                        .build())
                .build())
        .oauthConfig(AppManifestParams.OAuthConfig.builder()
                .scopes(AppManifestParams.Scopes.builder().bot(Arrays.asList("commands")).build())
                .build())
        .settings(AppManifestParams.Settings.builder()
                .socketModeEnabled(true)
                .eventSubscriptions(AppManifestParams.EventSubscriptions.builder()
                        .botEvents(Arrays.asList("user_connection", "user_connection_status_requested"))
                        .build())
                .build())
        .build();
String appId = client.appsManifestCreate(r -> r.manifest(manifest)).getAppId();
client.appsManifestExport(r -> r.appId(appId)).getManifest().getFeatures().getUserConnections();
  1. Confirm the create succeeds and the export returns isEnabled true with example.com in authHosts.
  2. Set isEnabled to false, run apps.manifest.update, and confirm the export returns isEnabled false with authHosts kept.
  3. Remove user_connection from botEvents and confirm apps.manifest.validate reports user_connections_requires_user_connection_subscription.
  4. Remove authHosts and confirm apps.manifest.validate reports the missing field.

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

🤖 Generated with Claude Code

Adds AppManifest.UserConnections (isEnabled, authHosts) on Features so
apps.manifest.create, update and export keep the standardized app
authentication settings instead of dropping them. The export json-logs
sample and SampleObjects carry the field so generated response types
pick it up.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.94%. Comparing base (e8352d1) to head (74219dd).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1662      +/-   ##
============================================
- Coverage     72.98%   72.94%   -0.05%     
+ Complexity     4630     4628       -2     
============================================
  Files           486      486              
  Lines         14632    14632              
  Branches       1524     1524              
============================================
- Hits          10679    10673       -6     
- Misses         3049     3053       +4     
- Partials        904      906       +2     
Flag Coverage Δ
jdk-14 72.94% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@WilliamBergamin
WilliamBergamin marked this pull request as ready for review October 22, 2026 22:40
@WilliamBergamin
WilliamBergamin requested a review from a team as a code owner October 22, 2026 22:40
@zimeg zimeg added enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client project:slack-api-model project:slack-api-model semver:minor labels Oct 22, 2026
@zimeg zimeg added this to the 1.52.1 milestone Oct 22, 2026

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin It's nice to find these changes with test while having a coffee of me own ☕ 😉

apps.manifest.create, update and validate take AppManifestParams, not
AppManifest, so the feature could be read from an export but not sent.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@WilliamBergamin
WilliamBergamin merged commit 2d884d7 into main Oct 23, 2026
7 checks passed
@WilliamBergamin
WilliamBergamin deleted the manifest-user-connections branch October 23, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client project:slack-api-model project:slack-api-model semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants