A simple Slack app that updates your Slack status to the song you currently listen to on Spotify.
This app uses the Bolt for Slack framework.
- Create a Spotify app here
- Set
REDIRECT_URL
to your glitch project urlhttps://<your-project>.glitch.me/spotify/oauth
- Copy
SPOTIFY_CLIENT_ID
,SPOTIFY_CLIENT_SECRET
andSPOTIFY_REDIRECT_URL
to your.env
variables - Get an access token by going through the OAUTH flow
https://<your-project>.glitch.me/spotify/connect
- Copy to token to
SPOTIFY_REFRESH_TOKEN
in your.env
file
- Create an app on Slack
- Add
User Token Scopes
inOAuth & Permissions
users.profile:read
users.profile:write
- Install App
- Copy User Token to
SLACK_USER_TOKEN
in your.env
file
- Install dependencies via
npm
oryarn
- Create a
.env
file and make sure to set all variables
SLACK_USER_TOKEN=<your Slack app's user token>
SPOTIFY_CLIENT_ID=<your Spotify app's client id>
SPOTIFY_CLIENT_SECRET=<your Spotify app's client secret>
SPOTIFY_REDIRECT_URL=<your Spotify app's redirect url>
SPOTIFY_REFRESH_TOKEN=<your Spotify access token>
- Create a cronjob (or something similar) that calls
/ping
to update your status