Find our documentation on https://slack-spring-boot.kreait.dev/
Create a new spring boot application for example on https://start.spring.io (best to use kotlin and gradle for this example)
Add the following to your build.gradle file
dependencies {
implementation(group: "com.kreait.slack", name: "slack-spring-boot-starter", version: "{version}")
}
Locate your app credentials under the Basic Information menu item on https://api.slack.com/apps (select your app) By default there is 3 ways adding your slack credentials to the application
-
Create a file $HOME/.slack/credentials
slack_app_client_id=<client_id> slack_app_client_secret=<client_secret> slack_app_signing_secret=<signing secret>
-
Set Environment Variables
SLACK_APP_CLIENT_ID=<client_id> SLACK_APP_CLIENT_SECRET=<client_secret> SLACK_APP_SIGNING_SECRET=<signing secret>
-
Set JVM System Properties
slack.application.client-id=<client_id> slack.application.client-secret=<client_secret> slack.application.signing=<signing secret>
If you want to provide your own CredentialsProvider implement the interface and expose it as a Bean/Component
Start your application
./gradlew bootRun
To contribute to the project, please read the Contribution Guidelines