Slack API
Slack API
is a simple Java library to post a Slack message to specific channel.
Features
- postMessage
-
SlackAPI.postMessage("xxxx-xxxxxxxxx-xxxx", "general", "Hello, World !");
-
Creating Token
-
token can be generated by two ways.
-
- Visit Legacy Tokens page at https://api.slack.com/custom-integrations/legacy-tokens.
- Click Create token.
-
- Create an App from https://api.slack.com/apps.
- Features > OAuth & Permissions > Scopes > Bot Token Scopes > "channels:read", "chat:write".
- Features > OAuth & Permissions > OAuth Tokens & Redirect URLs > Install App to Workspace.
- Add an App to specific channel.
-
Dependency
<dependencies>
<dependency>
<groupId>org.silentsoft</groupId>
<artifactId>slack-api</artifactId>
<version>0.1.1</version>
</dependency>
</dependencies>
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please note we have a CODE_OF_CONDUCT, please follow it in all your interactions with the project.