{"id":13549388,"url":"https://github.com/jwilsson/spotify-web-api-php","last_synced_at":"2025-05-13T19:15:22.842Z","repository":{"id":17952537,"uuid":"20937602","full_name":"jwilsson/spotify-web-api-php","owner":"jwilsson","description":"A PHP wrapper for Spotify's Web API.","archived":false,"fork":false,"pushed_at":"2025-04-19T06:24:51.000Z","size":2056,"stargazers_count":875,"open_issues_count":3,"forks_count":155,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-04-27T20:03:28.334Z","etag":null,"topics":["php","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/jwilsson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2014-06-17T19:57:07.000Z","updated_at":"2025-04-24T10:16:46.000Z","dependencies_parsed_at":"2023-12-14T20:28:06.140Z","dependency_job_id":"dc72a23e-6619-43e9-a498-c596336b1715","html_url":"https://github.com/jwilsson/spotify-web-api-php","commit_stats":{"total_commits":740,"total_committers":40,"mean_commits":18.5,"dds":0.0972972972972973,"last_synced_commit":"05bb47fde995e619775679c1eb32eeda3f9af6aa"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fspotify-web-api-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fspotify-web-api-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fspotify-web-api-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilsson%2Fspotify-web-api-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwilsson","download_url":"https://codeload.github.com/jwilsson/spotify-web-api-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010821,"owners_count":21999002,"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":["php","spotify"],"created_at":"2024-08-01T12:01:21.316Z","updated_at":"2025-05-13T19:15:22.824Z","avatar_url":"https://github.com/jwilsson.png","language":"PHP","readme":"# Spotify Web API PHP\n\n[![Packagist](https://img.shields.io/packagist/v/jwilsson/spotify-web-api-php.svg)](https://packagist.org/packages/jwilsson/spotify-web-api-php)\n![build](https://github.com/jwilsson/spotify-web-api-php/workflows/build/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/jwilsson/spotify-web-api-php/badge.svg?branch=main)](https://coveralls.io/r/jwilsson/spotify-web-api-php?branch=main)\n\nThis is a PHP wrapper for [Spotify's Web API](https://developer.spotify.com/web-api/). It includes the following:\n\n* Helper methods for all API endpoints:\n    * Information about artists, albums, tracks, podcasts, audiobooks, and users.\n    * List music featured by Spotify.\n    * Playlist and user music library management.\n    * Spotify catalog search.\n    * User playback control.\n* Authorization flow helpers.\n* Automatic refreshing of access tokens.\n* Automatic retry of rate limited requests.\n* PSR-4 autoloading support.\n\n## Requirements\n* PHP 8.1 or later.\n* PHP [cURL extension](http://php.net/manual/en/book.curl.php) (Usually included with PHP).\n\n## Installation\nInstall it using [Composer](https://getcomposer.org/):\n\n```sh\ncomposer require jwilsson/spotify-web-api-php\n```\n\n## Usage\nBefore using the Spotify Web API, you'll need to create an app at [Spotify’s developer site](https://developer.spotify.com/web-api/).\n\n*Note: Applications created after 2021-05-27 [might need to perform some extra steps](https://developer.spotify.com/community/news/2021/05/27/improving-the-developer-and-user-experience-for-third-party-apps/).*\n\nSimple example displaying a user's profile:\n```php\nrequire 'vendor/autoload.php';\n\n$session = new SpotifyWebAPI\\Session(\n    'CLIENT_ID',\n    'CLIENT_SECRET',\n    'REDIRECT_URI'\n);\n\n$api = new SpotifyWebAPI\\SpotifyWebAPI();\n\nif (isset($_GET['code'])) {\n    $session-\u003erequestAccessToken($_GET['code']);\n    $api-\u003esetAccessToken($session-\u003egetAccessToken());\n\n    print_r($api-\u003eme());\n} else {\n    $options = [\n        'scope' =\u003e [\n            'user-read-email',\n        ],\n    ];\n\n    header('Location: ' . $session-\u003egetAuthorizeUrl($options));\n    die();\n}\n```\n\nFor more instructions and examples, check out the [documentation](/docs/).\n\nThe [Spotify Web API Console](https://developer.spotify.com/web-api/console/) can also be of great help when trying out the API.\n\n## Contributing\nContributions are more than welcome! See [CONTRIBUTING.md](/CONTRIBUTING.md) for more info.\n\n## License\nMIT license. Please see [LICENSE.md](LICENSE.md) for more info.\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwilsson%2Fspotify-web-api-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwilsson%2Fspotify-web-api-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwilsson%2Fspotify-web-api-php/lists"}