Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d20ea42

Browse files
gregschwartzfrenck
authored andcommitted
Update slack.markdown (home-assistant#11143)
Clarifying steps to create Slack app and get OAuth token
1 parent 482c79c commit d20ea42

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

source/_integrations/slack.markdown

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,21 @@ The `slack` platform allows you to deliver notifications from Home Assistant to
1212

1313
## Setup
1414

15-
If you are planning to use Slack as yourself then you'll need to create a [new app](https://api.slack.com/apps) under your Slack.com account. After creating the app, access the OAuth & Permissions link under the Features heading in the sidebar. Your OAuth Access Token should be located there. This is the key that you'll use in your `configuration.yaml` file.
15+
### Bot posting as you
16+
17+
1. Create a [new app](https://api.slack.com/apps) under your Slack.com account
18+
2. Click the `OAuth & Permissions` link in the sidebar, under the Features heading
19+
2. In the Scopes section, add the `chat:write:user` scope, `Send messages as user`
20+
3. Scroll up to `OAuth Tokens & Redirect URLs` and click `Install App`
21+
4. Copy your `OAuth Access Token` and put that key into your `configuration.yaml` file -- see below
1622

1723
<div class='note'>
1824

1925
There is an app credential Verification Token on the Basic Settings of your app. This is **not** the API key you want.
2026

2127
</div>
2228

23-
You will also need to ensure that you have added the appropriate scope when configuring your app. In this case, in the Scopes section, add the `Send messages as user` scope, e.g., (chat:write:user).
24-
29+
### Bot posting as its own user
2530
It is also possible to use Slack bots as users. Just create a new bot at https://[YOUR_TEAM].slack.com/apps/build/custom-integration and use the provided token for that. You can add an icon from the frontend for Home Assistant and give the bot a meaningful name.
2631

2732
Don't forget to invite the bot to the room where you want to get the notifications.

0 commit comments

Comments
 (0)