Update your slack status with the current song playing via the Music.app
-
setup the slack app
-
create a new app https://api.slack.com/apps?new_app=1 providing a name and selecting the desired Slack Workspace that you're going to run apple music to slack on.
-
Under "Add features and functionality" select the "Permissions" section
-
scroll down to "User Token Scopes" and add
users.profile:write
-
scoll up to the top of the page and click "Install App to Workspace".
-
copy the
OAuth Access Token
, this will be used as theSLACK_SECRET_TOKEN
-
-
clone the repo & compile with
cargo build
-
Run the binary with the env var
SLACK_SECRET_TOKEN
set to yourOAuth Access Token
Options:
-
run via shell
export SLACK_SECRET_TOKEN=xoxp-11111-11111-11111-111111111111 while true; do ./target/debug/apple-music-to-slack; # slack rates limit at anything less than 5 requests/second sleep 10; done
-
run via
launchd
cp ./target/debug/apple-music-to-slack /usr/local/bin/ cp xyz.dignam.apple-music-to-slack.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/xyz.dignam.apple-music-to-slack.plist # to disable the launchd job launchctl unload ~/Library/LaunchAgents/xyz.dignam.apple-music-to-slack.plist
-
-
Success! 🎶