All Projects → jwilsson → Spotify Web Api Php

jwilsson / Spotify Web Api Php

Licence: mit
A PHP wrapper for Spotify's Web API.

Labels

Projects that are alternatives of or similar to Spotify Web Api Php

Spotify Ad Free
A filter list to block all Spotify ads!
Stars: ✭ 479 (-26.53%)
Mutual labels:  spotify
Sconsify
A spotify console application
Stars: ✭ 572 (-12.27%)
Mutual labels:  spotify
Spotify Downloader
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
Stars: ✭ 6,957 (+967.02%)
Mutual labels:  spotify
Tauonmusicbox
The Linux desktop music player from the future! 🌆
Stars: ✭ 494 (-24.23%)
Mutual labels:  spotify
Homehost
self-hosted, Netflix-like app made for streaming
Stars: ✭ 564 (-13.5%)
Mutual labels:  spotify
Warez
All your base are belong to us!
Stars: ✭ 584 (-10.43%)
Mutual labels:  spotify
Spotify Cli Linux
🎶 A command line interface to Spotify on Linux
Stars: ✭ 443 (-32.06%)
Mutual labels:  spotify
Spotify Adblock Linux
Spotify adblocker for Linux
Stars: ✭ 641 (-1.69%)
Mutual labels:  spotify
Monstercat Visualizer
A real time audio visualizer for Rainmeter similar to the ones used in the Monstercat videos.
Stars: ✭ 571 (-12.42%)
Mutual labels:  spotify
Lyricfier
a Spotify Lyrics alternative app | New updates at https://github.com/emilioastarita/lyricfier2 (a faster version in golang)
Stars: ✭ 598 (-8.28%)
Mutual labels:  spotify
Pyspotify
Python bindings for libspotify
Stars: ✭ 502 (-23.01%)
Mutual labels:  spotify
Spotifyadblock
Protect your privacy by blocking all annoying Spotify ads & analytics in Linux, OSX and Windows with hosts file.
Stars: ✭ 540 (-17.18%)
Mutual labels:  spotify
Spotify Dl
Downloads songs from your Spotify Playlist
Stars: ✭ 578 (-11.35%)
Mutual labels:  spotify
Hifiberry Os
Linux distribution optimized for audio playback
Stars: ✭ 487 (-25.31%)
Mutual labels:  spotify
Clone Wars
100+ open-source clones of popular sites like Airbnb, Amazon, Instagram, Netflix, Tiktok, Spotify, Whatsapp, Youtube etc. See source code, demo links, tech stack, github stars.
Stars: ✭ 12,604 (+1833.13%)
Mutual labels:  spotify
Reactochart
📈 React chart component library 📉
Stars: ✭ 459 (-29.6%)
Mutual labels:  spotify
Lofi
🎵🔉 A mini Spotify player with WebGL visualizations.
Stars: ✭ 583 (-10.58%)
Mutual labels:  spotify
Rpi Audio Receiver
Raspberry Pi Audio Receiver with Bluetooth A2DP, AirPlay, UPnP and Spotify Connect
Stars: ✭ 650 (-0.31%)
Mutual labels:  spotify
Spicetify Cli
Commandline tool to customize Spotify client. Supports Windows, MacOS and Linux.
Stars: ✭ 9,316 (+1328.83%)
Mutual labels:  spotify
Muse
An open-source Spotify controller with TouchBar support
Stars: ✭ 594 (-8.9%)
Mutual labels:  spotify

Spotify Web API PHP

Packagist build Coverage Status

This is a PHP wrapper for Spotify's Web API. It includes the following:

  • Helper methods for all API endpoints:
    • Information about artists, albums, tracks, podcasts, and users.
    • List music featured by Spotify.
    • Playlist and user music library management.
    • Spotify catalog search.
    • User playback control.
  • Authorization flow helpers.
  • Automatic refreshing of access tokens.
  • Automatic retry of rate limited requests.
  • PSR-4 autoloading support.

Requirements

Installation

Install it using Composer:

composer require jwilsson/spotify-web-api-php

Usage

Before using the Spotify Web API, you'll need to create an app at Spotify’s developer site.

Simple example displaying a user's profile:

require 'vendor/autoload.php';

$session = new SpotifyWebAPI\Session(
    'CLIENT_ID',
    'CLIENT_SECRET',
    'REDIRECT_URI'
);

$api = new SpotifyWebAPI\SpotifyWebAPI();

if (isset($_GET['code'])) {
    $session->requestAccessToken($_GET['code']);
    $api->setAccessToken($session->getAccessToken());

    print_r($api->me());
} else {
    $options = [
        'scope' => [
            'user-read-email',
        ],
    ];

    header('Location: ' . $session->getAuthorizeUrl($options));
    die();
}

For more instructions and examples, check out the documentation.

The Spotify Web API Console can also be of great help when trying out the API.

Contributing

Contributions are more than welcome! See CONTRIBUTING.md for more info.

License

MIT license. Please see LICENSE.md for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].