Skip to content

Commit

Permalink
treehouses message slack apitoken new formatting (fixes #2090) (#2094)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
JLKwong and dogi authored Mar 15, 2021
1 parent f3e7cc4 commit 0aa469d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
26 changes: 21 additions & 5 deletions modules/message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,28 @@ function message {
elif check_apitoken slack; then
get_apitoken slack
else
echo "To get an authorized access token"
echo "To get an authorized access token:"
echo ""
echo "Navigate to https://api.slack.com/apps and create an APP. Provide a name for the APP and select the \"Development Slack Workspace (eg : Open Learning Exchange)\" from the drop down list"
echo "Go to \"OAuth & Permission\" under \"features \" and select the scope under \"User Token Scopes\" and add \"chat:write\", \"channels:write\", \"channel:read\", \"channel:history\", \"groups:write\", \"group:read\", \"mpim:write\", \"im:write\", \"usergroups.read\" and \"users.read\" for the APP from the drop down list"
echo "Then install APP to the workspace and click the allow button to give permissions in the redirected link and then you will get the \"OAuth access token\""
echo "Run $BASENAME message slack apitoken <oauth access token>"
echo "1. Go to https://api.slack.com/apps"
echo "2. Click \"Create New App\""
echo "3. Type a name in \"App Name\""
echo "4. Select the \"Development Slack Workspace\" (eg : Open Learning Exchange)\ from the drop-down"
echo "5. Click \"OAuth & Permission\" under \"features \""
echo "6. Under \"User Token Scopes\", click \"Add an OAuth Scope\""
echo "7. Add the following permissions:"
echo " \"chat:write\""
echo " \"channels:write\""
echo " \"channels:read\""
echo " \"channels:history\""
echo " \"groups:write\""
echo " \"groups:read\""
echo " \"im:write\""
echo " \"mpim:write\""
echo " \"usergroups:read\""
echo " \"users:read\""
echo "8. Under \"OAuth Tokens & Redirect URLs\", click \"Install to Workspace\""
echo "9. Click \"Allow\". This will give permissions and display the User OAuth Token"
echo "10. Run $BASENAME message slack apitoken <User OAuth Token>"
fi
;;
channels)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@treehouses/cli",
"version": "1.25.26",
"version": "1.25.27",
"remote": "4000",
"description": "Thin command-line interface for Raspberry Pi low level configuration.",
"main": "cli.sh",
Expand Down

0 comments on commit 0aa469d

Please sign in to comment.