Download the PHP package rgjoni/spotify-web-api-sdk without Composer

On this page you can find all versions of the php package rgjoni/spotify-web-api-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package spotify-web-api-sdk

GitHub GitHub packagist GitHub

Spotify Web API SDK

An SDK for the Spotify Web API, covering all available endpoints and offering different authorization flows.

Reference link (external)

Table of contents

  1. Supported API's
  2. Supported authorization flows
  3. Dependencies
    1. Development dependencies
  4. Installation
  5. Namespace
  6. Usage
    1. First Steps
    2. Authorization
      1. Authorization Code Flow
      2. Authorization Code Flow with Proof Key for Code Exchange(PKCE)
      3. Client Credentials Flow
      4. Persisting tokens
    3. Web API Endpoints
  7. Errors & Exceptions
  8. Contributing
  9. License

Supported API's

Supported authorization flows

Dependencies

Development dependencies

Installation

Using composer:

Namespace

Usage

First steps

Firstly, create a main Sdk object with the client credentials(client id, client secret), scopes and the redirect uri. For the credentials, you have to create an app on the developer dashboard.

Authorization

After having created the main sdk object, these are the different ways to authorize your App to act on behalf of a user.

Authorization Code Flow

Authorization Code Flow with Proof Key for Code Exchange(PKCE)

  1. Generate code verifier & challenge, persist the verifier and build the url.

  2. After getting an authorization code on behalf of the end-user, seek access.

Client Credentials Flow

Persisting tokens

This SDK does not offer tokens persistence(access & refresh token), so that responsibility falls on the consuming project. In the examples in this README, cookie storage is used; but it's not the only possibility, read this & this(external links) for more information.

Web API Endpoints

Now that you have successfully authorized your App and persisted your tokens, now's the time to have some fun and request some user data!

Current user's profile

A public user's profile

The latter outputs the following JSON response:

Get a single artist

This outputs the following JSON response:

Errors & Exceptions

If you make an API request when the access token has expired, the following exception will be thrown:

Gjoni\SpotifyWebApiSdk\Exception\AccessTokenExpiredException

with the message:

The access token has expired, please refresh the token.

and the error code .

Other, usage errors, such as not providing the right parameter or the wrong amount of them, will cause the to bubble up to the top, necessitating to be handled by the project.

Contributing

Pull requests and issues are welcome, please refer to CONTRIBUTORS.md

License

GPLv3


All versions of spotify-web-api-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8
ext-json Version *
ext-http Version *
guzzlehttp/guzzle Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rgjoni/spotify-web-api-sdk contains the following files

Loading the files please wait ....