Skip to content

Commit e7a0740

Browse files
Merge pull request haskellcamargo#104 from thornjad/patch-1
Add new token instructions to readme
2 parents f5f5eec + 5f81c9b commit e7a0740

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

+24-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,33 @@ The project is still under alpha, there are lots of things already done, but the
1010

1111
## Setup
1212

13-
The first thing you need to do is to get a [Slack token here](https://api.slack.com/custom-integrations/legacy-tokens).
13+
### Using legacy token
14+
15+
First of all get a [Slack token here](https://api.slack.com/custom-integrations/legacy-tokens).
1416
Use, create or request a token for each workspace that you'll use on Sclack.
15-
Not all workspaces allow you to generate a token, so sometimes you'll need to
17+
Not all workspaces allow you to generate a legacy token, so sometimes you'll need to
1618
ask for the administrator to enable the feature.
1719

20+
### Without a legacy token
21+
22+
Unfortunately some serious hoops need to be jumped through to use a non-legacy token.
23+
24+
1. Go to <https://api.slack.com/apps>
25+
2. Click "Create new app"
26+
3. Give the app a name (maybe "Sclack") and select the server you'd like to use
27+
4. Go to "Permissions" and add a new redirect URL: `http://localhost:8080`
28+
5. Go back to the previous page, you'll be able to see "Client ID" (you will also need the "Client Secret" later). Use this to fill in this url:
29+
```
30+
https://slack.com/oauth/authorize?client_id=[Client ID here]&scope=client
31+
```
32+
6. Go to that URL in your browser, and authorize the app
33+
7. The page will redirect to a blank page. Look at the URL and copy the `code=` parameter (http://localhost:8080?code=[code-will-be-here]&state=)
34+
8. Now using the copied code, as well as the "Client ID" and "Client Secret" from the app page, fill in and execute this command:
35+
```
36+
curl -s "https://slack.com/api/oauth.access?client_id=[client id here]&client_secret=[client secret here]&code=[code here]"
37+
```
38+
9. Finally, copy the `access_token` from the response (should start with `xoxs-`). This is your new auth token for Sclack
39+
1840
## Optional Dependencies
1941

2042
### Nerd Fonts

0 commit comments

Comments
 (0)