2017 © Pedro Peláez
 

library spotify-web-api-php

A PHP wrapper for Spotify's Web API.

image

jwilsson/spotify-web-api-php

A PHP wrapper for Spotify's Web API.

  • Saturday, July 28, 2018
  • by jwilsson
  • Repository
  • 29 Watchers
  • 395 Stars
  • 107,718 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 91 Forks
  • 3 Open issues
  • 46 Versions
  • 12 % Grown

The README.md

Spotify Web API PHP

Packagist build Coverage Status, (*1)

This is a PHP wrapper for Spotify's Web API. It includes the following:, (*2)

  • Helper methods for all API endpoints:
    • Information about artists, albums, tracks, podcasts, audiobooks, 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:, (*3)

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., (*4)

Note: Applications created after 2021-05-27 might need to perform some extra steps., (*5)

Simple example displaying a user's profile:, (*6)

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., (*7)

The Spotify Web API Console can also be of great help when trying out the API., (*8)

Contributing

Contributions are more than welcome! See CONTRIBUTING.md for more info., (*9)

License

MIT license. Please see LICENSE.md for more info., (*10)

The Versions

28/07 2018

dev-master

9999999-dev http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • php ^5.6 || ^7.0

 

The Development Requires

by Jonathan Wilsson

spotify

18/07 2018

2.5.1

2.5.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

03/07 2018

2.5.0

2.5.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

06/06 2018

2.4.0

2.4.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

05/06 2018

2.3.0

2.3.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

05/05 2018

2.2.1

2.2.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

01/03 2018

2.2.0

2.2.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

02/02 2018

2.1.1

2.1.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

06/12 2017

2.1.0

2.1.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

25/09 2017

2.0.1

2.0.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

15/08 2017

2.0.0

2.0.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

26/07 2017

1.12.0

1.12.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

12/06 2017

1.11.1

1.11.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

09/06 2017

1.11.0

1.11.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

29/04 2017

1.10.1

1.10.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

12/04 2017

1.10.0

1.10.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

31/03 2017

dev-connect-endpoints

dev-connect-endpoints http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

24/03 2017

1.9.0

1.9.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

05/03 2017

1.8.0

1.8.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

25/02 2017

1.7.0

1.7.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

28/01 2017

1.6.1

1.6.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

28/01 2017

1.6.0

1.6.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

11/12 2016

1.5.0

1.5.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

27/10 2016

1.4.2

1.4.2.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

25/10 2016

1.4.1

1.4.1.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

06/10 2016

1.4.0

1.4.0.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

23/09 2016

1.3.4

1.3.4.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

06/09 2016

1.3.3

1.3.3.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

30/05 2016

1.3.2

1.3.2.0 http://jwilsson.github.io/spotify-web-api-php/

A PHP wrapper for Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

03/04 2016

1.3.1

1.3.1.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

29/03 2016

1.3.0

1.3.0.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

01/12 2015

1.2.0

1.2.0.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

24/11 2015

1.1.0

1.1.0.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

13/10 2015

1.0.0

1.0.0.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

05/09 2015

0.10.0

0.10.0.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

06/07 2015

0.9.0

0.9.0.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

02/05 2015

0.8.2

0.8.2.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

The Development Requires

by Jonathan Wilsson

spotify

29/03 2015

0.8.1

0.8.1.0 http://jwilsson.github.io/spotify-web-api-php/

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

22/03 2015

0.8.0

0.8.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

06/12 2014

0.7.0

0.7.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

26/10 2014

0.6.0

0.6.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

25/10 2014

0.5.0

0.5.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

01/09 2014

0.4.0

0.4.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

23/08 2014

0.3.0

0.3.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

26/07 2014

0.2.0

0.2.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify

28/06 2014

0.1.0

0.1.0.0 https://github.com/jwilsson/spotify-web-api-php

PHP implementation of Spotify's Web API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Jonathan Wilsson

spotify