{"id":13529512,"url":"https://github.com/izayl/spotify-box","last_synced_at":"2025-04-10T03:55:17.117Z","repository":{"id":37386769,"uuid":"325744984","full_name":"izayl/spotify-box","owner":"izayl","description":"🎶 Automatic update pinned gist to show your recent Spotify top tracks.","archived":false,"fork":false,"pushed_at":"2023-10-26T04:39:32.000Z","size":462,"stargazers_count":127,"open_issues_count":0,"forks_count":92,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T03:55:11.387Z","etag":null,"topics":["actions","pinned-gist","spotify"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/izayl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"izayl","ko_fi":"izayl","github":"izayl"}},"created_at":"2020-12-31T07:41:47.000Z","updated_at":"2025-04-08T03:38:51.000Z","dependencies_parsed_at":"2024-04-12T20:03:47.646Z","dependency_job_id":null,"html_url":"https://github.com/izayl/spotify-box","commit_stats":{"total_commits":34,"total_committers":7,"mean_commits":4.857142857142857,"dds":"0.38235294117647056","last_synced_commit":"270d204cd5ba130b972a33bd02f7a5894d8181c3"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izayl%2Fspotify-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izayl%2Fspotify-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izayl%2Fspotify-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izayl%2Fspotify-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/izayl","download_url":"https://codeload.github.com/izayl/spotify-box/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154999,"owners_count":21056542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["actions","pinned-gist","spotify"],"created_at":"2024-08-01T07:00:36.957Z","updated_at":"2025-04-10T03:55:17.090Z","avatar_url":"https://github.com/izayl.png","language":"JavaScript","funding_links":["https://patreon.com/izayl","https://ko-fi.com/izayl","https://github.com/sponsors/izayl"],"categories":["others","External Services"],"sub_categories":[],"readme":"\u003cp align='center'\u003e\n  \u003cimg width=\"400\" src=\"https://user-images.githubusercontent.com/10740043/103472132-b0cbb100-4dc4-11eb-97a2-4261c4c5c4f5.png\"\u003e\n  \u003ch3 align=\"center\"\u003espotify-box\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eAutomatic update pinned gist to show your recent Spotify top tracks.\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\u003csub\u003eDon't forget to leave a ⭐ if you found this useful.\u003c/sub\u003e\u003c/p\u003e\n\u003c/p\u003e\n\n---\n\u003e 📌✨ For more pinned-gist projects like this one, check out: \u003chttps://github.com/matchai/awesome-pinned-gists\u003e\n\n## ✨ Inspiration\n\nThis code was heavily inspired by [@jacc's music-box](https://github.com/jacc/music-box).\n\n## 🎒 Prep Work\n\n1. Create a new public GitHub Gist (\u003chttps://gist.github.com/\u003e)\n2. Create a token with the `gist` scope and copy it. (\u003chttps://github.com/settings/tokens/new\u003e)\n3. Create a Spotify Application and get certified, detail steps you can see below.\n\n\u003cdetails\u003e\u003csummary\u003eSpotify Authorization Steps\u003c/summary\u003e\n\u003cp\u003e\n\n### 1. Create new Spotify Application\n\nVisit \u003chttps://developer.spotify.com/dashboard/applications\u003e login and create a new Application\n\nAfter create, you will get your Client ID \u0026 Client Secret.\n\nThen click `EDIT SETTINGS` Button, add `http://localhost:3000` to Redirect URIs\n\n### 2. Get Authorization Code\n\nVisit following URL after replace `$CLIENT_ID` to yours\n\n```\nhttps://accounts.spotify.com/en/authorize?client_id=$CLIENT_ID\u0026response_type=code\u0026redirect_uri=http:%2F%2Flocalhost:3000\u0026scope=user-read-currently-playing%20user-top-read\n```\n\nAgree to this application to access your info, after that your will be redirect to a new page, the url like this: `http://localhost:3000?code=$CODE`\n\nthis `$CODE` is your Authorization Code, it will be used to generate access_token at next step.\n\n### 3. Get Access Token\n\nthe last step, use the `$CLIENT_ID` and `$CLIENT_SECRET` from step 1, `$CODE` from step 2 to replace the shell command below\n\n```shell\ncurl -d client_id=$CLIENT_ID -d client_secret=$CLIENT_SECRET -d grant_type=authorization_code -d code=$CODE -d redirect_uri=http://localhost:3000 https://accounts.spotify.com/api/token\n```\n\nafter run it at your terminal, you'll get your `${REFRESH_TOKEN}`\n\nthe output may like this:\n\n```json\n{\n    \"access_token\": \"BQBi-jz.....yCVzcl\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 3600,\n    \"refresh_token\": \"AQCBvdy70gtKvnrVIxe...\",\n    \"scope\": \"user-read-currently-playing user-top-read\"\n}\n```\n\nif the response not return refresh_token, back to step 2 and retry.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## 🖥 Project Setup\n\n1. Fork this repo\n2. Go to your fork's `Settings` \u003e `Environments` \u003e `New environment` and create an environment called \"prod\"\n3. Choose your \"prod\" environment and `Add Secret` for each environment secret (below)\n4. Enable Actions on your fork via the 'Actions' tab\n5. Enable the 'spotify-box' Workflow via the 'Actions' tab\n6. Kick off a workflow run of the 'spotify-box' Workflow via Actions \u003e spotify-box \u003e Run workflow\n\n## 🤫 Environment Secrets\n\n- **GIST_ID:** The ID portion from your gist url `https://gist.github.com/\u003cgithub username\u003e/`**`6d5f84419863089a167387da62dd7081`**.\n- **GH_TOKEN:** The GitHub token generated above.\n- **SPOTIFY_CLIENT_ID:** The Client ID you got from Spotify Developer Dashboard.\n- **SPOTIFY_CLIENT_SECRET:** The Client Secret you got from Spotify Developer Dashboard.\n- **SPOTIFY_REFRESH_TOKEN:** The Refresh Token you got from Spotify API.\n\n## 💸 Donations\n\nFeel free to use the GitHub Sponsor button to donate towards my work if you think this project is helpful. 🤗\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizayl%2Fspotify-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fizayl%2Fspotify-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizayl%2Fspotify-box/lists"}