Releases: slackapi/java-slack-sdk
version 1.13.0
New Features
HTTP headers in Web API responses
Since this version, all the Web API responses return not only parsed response body data but also its response headers. Particularly, the x-oauth-scopes
value should be helpful to easily know the list of granted scopes for the token used for the API call.
Changes
- [slack-api-client] #850 Add getHttpResponseHeaders() method to Web API responses - Thanks @seratch
- [slack-api-client] #877 Fix race conditions in the Slack API Client by adding atomicity - Thanks @daelynj
- [slack-api-client] #868 Mark rtm.start as deprecated - Thanks @seratch
- [slack-api-client] #878 Add team.billing.info and team.preferences.list APIs - Thanks @seratch
- [slack-api-client] #841 #634 Add admin.conversations.{get|set|remove}CustomRetention API support - Thanks @seratch
- [slack-app-model] #859 Fix #857 Add the missing "pronouns" field to User.Profile data class - Thanks @seratch @petehannam
- [slack-api-model] #864 #863 Support TimePickerElement in Block Kit Kotlin DSL - Thanks @ikolomiets
- [bolt] #851 Fix an error in Socket Mode document - Thanks @bcarter97
- [all] #866 #865 Fix to parent pom.xml that allows submodules override default language level in IntelliJ IDEA - Thanks @ikolomiets
- [all] #880 Upgrade patch/minor versions of dependencies for v1.13 release - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/39?closed=1
- All changes: v1.12.1...v1.13.0
version 1.12.1
Changes
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/40?closed=1
- All changes: v1.12.0...v1.12.1
version 1.12.0
New Features
Turning off state parameter validation in the OAuth flow
Enterprise Grid org admins can start org-wide app installations from their app management page. In this situation, no state
parameter will be attached to the query string value througout the OAuth flow.
Since this version, we've added a new option to customize this behavior for this use case. You can set the stateValidationEnabled
flag in AppConfig
to false if you turn the validation off.
var config = new AppConfig();
// set client_id etc.
config.setStateValidationEnabled(false);
var app = new App(config).asOAuthApp(true);
app.start();
Please note that we still don't recommend disabling the state parameter validation for usual OAuth flow apps.
Changes
- [bolt] #829 Fix #828 Add stateValidationEnabled option to AppConfig - Thanks @seratch
- [bolt] #832 Remove cached slack, client in App to reflect changes in AppConfig - Thanks @seratch
- [bolt] #839 Fix #836 NPE in bolt-google-cloud-functions when the response body coming from Bolt app is null - Thanks @Arxing @seratch
- [slack-api-client] #838 Fix #837 oauth.v2.exchange API call fails due to lack of token parameter - Thanks @thomasylee @seratch
- [all] #840 Update dependencies for v1.12 release - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/38?closed=1
- All changes: v1.11.0...v1.12.0
version 1.11.0
New Features
New options to auto-ack Events API requests
Since this version, your Bolt apps can easily acknowledge Events API requests without having listener functions.
Here are the two options available in AppConfig
:
AppConfig#allEventsApiAutoAckEnabled: Boolean
: If true, Bolt enables auto-acknowledging for all Events API requests even when corresponding listeners are missing.AppConfig#subtypedMessageEventsAutoAckEnabled: Boolean
: If true, Bolt enables auto-acknowledging for message + subtype Events API requests even when corresponding listeners are missing.
var config = new AppConfig();
config.setSubtypedMessageEventsAutoAckEnabled(true);
var app = new App(config);
// Add your listeners here
app.start();
These options does not prevent your listener execution. With these options, Bolt can acknowledge Events API requests only when corresponding listeners are not registered.
New properties in link_shared
event
On September 1, 2021, the link_shared event is changing. The change will happen for free teams on September 1, and will roll out to paid teams over the following weeks. The chat.unfurl method will also accept new arguments.
Since this version, the updates in the Events API payload and chat.unfurl parameters are available. Refer to the pull request #817 and [the changelog](Refer to the changelog for more details: https://api.slack.com/changelog/2021-08-changes-to-unfurls) for more details.
Changes
- [bolt] #812 #769 Add new options to auto-acknowledge Events API requests - Thanks @seratch
- [slack-api-client][bolt] #773 #813 Slack Connect API / Events support - Thanks @seratch
- [slack-api-client][bolt] #817 Update link_shared event payload for the changes starting on September 1 - Thanks @seratch
- [slack-api-client] #819 Add missing optional arguments - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/37?closed=1
- All changes: v1.10.0...v1.11.0
version 1.11.0-RC1
Refer to v1.11.0 release notes
version 1.10.0
New Features
Sign in with Slack (OpenID Connect)
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 specification. With Bolt for Java v1.10 or higher, implementing the auth flow is much easier.
The following app is a simple example demonstrating how to handle the OpenID Connect flow with Bolt in Kotlin:
import com.auth0.jwt.JWT
import com.slack.api.bolt.App
import com.slack.api.bolt.jetty.SlackAppServer
fun main() {
val app = App().asOpenIDConnectApp(true)
app.openIDConnectSuccess { request, response, token ->
val claims = JWT.decode(token.idToken).claims
request.context.logger.info("id_token claims: {}", claims)
// Store the data in your database
// Redirect the user to the next step
response.statusCode = 302
response.headers["Location"] = listOf("https://slack.com/")
response
}
val apps = mutableMapOf("/slack/" to app)
val server = SlackAppServer(apps)
server.start() // http://localhost:3000/slack/install
// export SLACK_CLIENT_ID=
// export SLACK_CLIENT_SECRET=
// export SLACK_USER_SCOPES=openid,email,profile
// export SLACK_INSTALL_PATH=install
// export SLACK_REDIRECT_URI_PATH=oauth_redirect
// export SLACK_REDIRECT_URI=https://{your-domain-here}/slack/oauth_redirect
// gradle run
}
Refer to the document for more details.
Changes
- [bolt] #795 #796 Add "Sign in with Slack (OpenID Connect)" support - Thanks @seratch
- [slack-api-model] #801 Fix #759 by adding common fields in Block Kit model interfaces - Thanks @janjanneck @seratch
- [slack-api-client] #790 #785 A video link posted in a channel, causes a IllegalStateException for Conversation history API call - Thanks @sitamarn @seratch
- [slack-api-client] #784 #791 MessageDeletedEvent Java bug when a threaded message with Tombstone us deleted - Thanks @EnricoVoss @seratch
- [slack-api-client] #807 Improve the error caused in the #792 scenario - Thanks @seratch
- [slack-api-client] #794 Add email_password_policy_enabled to admin.users.invite API arguments - Thanks @seratch
- [all] #797 #770 Bump external dependency versions in v1.9 - Thanks @seratch
- [project] #793 Link to contributing and maintainer guides from README - Thanks @filmaj
- [tests] #800 Significantly improve the stability of the unit tests in CI builds - Thanks @filmaj
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/36?closed=1
- All changes: v1.9.0...v1.10.0
version 1.10.0-RC2
Refer to the v1.10.0 release note
version 1.10.0-RC1
Refer to the v1.10.0 release note
version 1.9.0
New Features
Token Rotation support
This version includes the support for the apps enabling the newly released token rotation for better security. Refer to the API document for the general information about the feature (the document will be available soon).
All you need do for enabling token rotation in your app would be:
- Turn the feature on in your Slack app configuration page
- Update your
InstallationService
- Implement the new
saveBot(Bot bot)
method - Update find/save methods to store/return new propertoes in the data models:
Installer
: installerUserRefreshToken, installerUserTokenExpiresAtBot
: botRefreshToken, botTokenExpiresAt
- Implement the new
Apart from the above changes, there is nothing else to do on your app side. If you're curious about how the rotation works, check this middleware's source code.
Changes
- [bolt] #781 Fix #775 by adding token rotation support - Thanks @seratch
- [slack-api-client] #777 Update the oauth.v2.access req/resp for supporting token rotation #775 - Thanks @seratch
- [slack-api-client] #778 Add oauth.v2.exchange endpoint support #775 - Thanks @seratch
- [slack-api-client] #772 #767 Add admin.auth.policy.* API support - Thanks @seratch
- [slack-api-client] #754 Correct users.conversations property type: created - Thanks @seratch
- [slack-api-client] #756 Update Audit Logs API client tests and their outputs - Thanks @seratch
- [slack-api-client] #782 Fix #766 by adding subteam to AdminConversationsSetConversationPrefsRequest.Pref - Thanks @seratch @anuj-dwivedi
- [slack-api-model] #755 Add edited property to AppMentionEvent class - Thanks @seratch
- [slack-api-model] #783 Fix #774 by adding missing fields in message_changed event class - Thanks @seratch @maganth-seetharaman
- [all] #786 #770 Bump external dependency versions in v1.9 - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/35?closed=1
- All changes: v1.8.1...v1.9.0
version 1.8.1
Changes
- [slack-api-client] #750 #752 #745 filesUpload with content + thread_ts does not work - Thanks @jfwang
- [slack-api-client] #751 #749 NullPointerException in runtime if proxy port is empty - Thanks @abhikarkamkar @alexkvak
- [slack-app-backend] #748 Add is_bot_user_member to link_shared event payload - Thanks @seratch
- [all] #753 Upgrade dependencies for v1.8.1 - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/34?closed=1
- All changes: v1.8.0...v1.8.1