{"id":15525674,"url":"https://github.com/lyrixx/slack-to-spotify","last_synced_at":"2026-02-16T23:38:23.576Z","repository":{"id":141739586,"uuid":"242149510","full_name":"lyrixx/slack-to-spotify","owner":"lyrixx","description":"Add to a Spotify playlist all songs posted in a slack channel.","archived":false,"fork":false,"pushed_at":"2024-01-10T09:50:52.000Z","size":18,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-21T12:51:56.675Z","etag":null,"topics":["php","sharing","slack","spotify"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyrixx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-21T13:49:36.000Z","updated_at":"2025-04-10T20:41:30.000Z","dependencies_parsed_at":"2024-01-10T10:53:01.531Z","dependency_job_id":"dc756a4e-a57c-4243-8a6e-6b49889631ca","html_url":"https://github.com/lyrixx/slack-to-spotify","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lyrixx/slack-to-spotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrixx%2Fslack-to-spotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrixx%2Fslack-to-spotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrixx%2Fslack-to-spotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrixx%2Fslack-to-spotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyrixx","download_url":"https://codeload.github.com/lyrixx/slack-to-spotify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrixx%2Fslack-to-spotify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29524334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T21:45:09.491Z","status":"ssl_error","status_checked_at":"2026-02-16T21:44:58.452Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","sharing","slack","spotify"],"created_at":"2024-10-02T10:59:36.551Z","updated_at":"2026-02-16T23:38:23.554Z","avatar_url":"https://github.com/lyrixx.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slack to Spotify\n\nAdd to a Spotify playlist all songs posted in a slack channel.\n\n## Installation\n\nThis project is as simple as possible. Just one file. No dependency. You can host it\nanywhere.\n\n### Spotify auth\n\nSpotify auth is very painful for such application!\n\nWe need a real application that run on internet... or we can fake it\n\n#### Initial setup\n\n1. Create a [new app](https://developer.spotify.com/dashboard/applications);\n2. Edit this app;\n3. Set the redirect URI that point to a service you can trust (you don't need to have access to this server, this is just a hack). We will refer to this value with `REDIRECT_URL`.\n\n#### oAuth Dance\n\nThen we will simulate the oAuth dance by hand.\n\nEdit the following URL with your `CLIENT_ID` and `REDIRECT_URL`, then open it in your browser to get the `CODE`.\n\nNote: The playlist must be public. If not, please adapt the scope to your need.\n\n```\nhttps://accounts.spotify.com/authorize?response_type=code\u0026scope=playlist-modify-public\u0026client_id=CLIENT_ID\u0026redirect_uri=REDIRECT_URL\n```\n\nFor example:\n\n```\nhttps://accounts.spotify.com/authorize?response_type=code\u0026scope=playlist-modify-public\u0026client_id=81cb20b1d11f45d6babacba97c66a303\u0026redirect_uri=https://jolicode.com/hack-spotify-callback\n```\n\nThen accept Spotify Conditions and Application Permissions.\nThen and you should hit an URL similar to:\n\n```\nREDIRECT_URL?code=CODE\n```\n\nFor example:\n\n```\nhttps://jolicode.com/hack-spotify-callback?code=AQAh2uk4qPB1PePrmWLw7QJ2E5qUTCf7oZQ12HcpLJIkG2euAmSV4plfeYk6sAbdeFXJAlGZF1RzXQMMIvyM8ybnGQ5GDp_ILIW1pTZe9rL4NAaWCQd-2FYxGJYHCjEIaDuGRZFh_UsB7Mjul62z0hDOohBrV5SE8UQzatSwQEEe_qI_s4t9vY3Bei1hcc-ax3FplBKJva8d6kj6JvkZRzTXO4Azg-q39Laod7YOB0PU_3TIsP6hOg\n```\n\nExtract the `CODE` from the URL. Once you get it, you can use it to get the token and the refresh token:\n\n```\ncurl -X POST https://accounts.spotify.com/api/token -u CLIENT_ID:CLIENT_SECRET -d code=CODE -d grant_type=authorization_code -d redirect_uri=REDIRECT_URL\n```\n\nFor example:\n\n```\ncurl -X POST https://accounts.spotify.com/api/token -u 81cb20b1d11f45d6babacba97c66a303:this-is-secret -d code=AQCW4dtKP2p51JrnFJEPzXeD2wE1SchGp2fNfdi-LvOkyGVt8WwrMG9W8-CC5Tj004cAmYzsqYtbwRPjG0z5yh8iYE-JrFxkpQmDAGQyN5OOqFFS7B4aYtD3w3sakrpP2b2FxnnE-mYtwhv270VdaTDZ_6JVQYjRCg8McPhUJyHzxWWjL0N2HUjfN4eMV9hDSzUpYIo1uQCUjnKLaKl2v6ZrUs_oUCl4I_GY76_tsKzEz37Vx4BkSQ -d grant_type=authorization_code -d redirect_uri=https://jolicode.com/hack-spotify-callback\n```\n\nYou should get something similar to:\n\n```json\n{\n  \"access_token\": \"BQC2K3L.....XXX0Ou\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600,\n  \"refresh_token\": \"AQDEoH5NHTTo_....2dINcnHHU\",\n  \"scope\": \"playlist-modify-public\"\n}\n```\n\nHere we go! we have a `refresh_token`. We will use it to get a new token each time we need to talk to Spotify.\n\n### Slack configuration\n\n#### Initial setup\n\n1. Create a [new application](https://api.slack.com/apps);\n2. Enable Event Subscription;\n3. Add \"App unfurl domains\" on `spotify.com` links;\n4. Install the app in the workspace;\n5. Invite the bot in the channel `/invite @BOT_NAME`.\n\nSee the `manifest.json` for the app configuration.\n\n### Application configuration\n\n```\ncp .env.dist .env\n# edit the file\n```\n\nThen configure your web server to use theses environnement variable. If you can\nnot, you can edit the `index.php` and set the variables directly in it.\n\n## Debug\n\nRun the local server:\n\n```\nexport $(egrep -v '^#' .env | xargs)\nphp -d variables_order=EGPCS -S 127.0.0.1:9999\n```\n\nStart ngrok:\n\n```\nngrok http 9999\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyrixx%2Fslack-to-spotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyrixx%2Fslack-to-spotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyrixx%2Fslack-to-spotify/lists"}