Web Playback SDK

A client-side JavaScript library to create a new Spotify Connect player.

Create a new Spotify Connect player in your browser

The Spotify Web Playback SDK is a client-side only JavaScript library that allows you to create a new player in Spotify Connect, stream and control audio tracks from Spotify inside your website application, and get metadata about the current playback.

The Web Playback SDK requires a Spotify Premium subscription

 window.onSpotifyWebPlaybackSDKReady = () => {
   const token = '[My Spotify Web API access token]';
   const player = new Spotify.Player({
     name: 'Web Playback SDK Quick Start Player',
     getOAuthToken: cb => { cb(token); }

Get Started

We provide a beginner’s tutorial to help you get started with the Web Playback SDK and a complete guide to lead you through the creation of a simple web app that makes a Spotify Player instance that can be controlled through Spotify Connect.

Supported browsers

Do not forget to check the Troubleshooting section to read further about known issues and limitations.


Operating System Browsers Status
Mac/Windows/Linux Chrome ✓ Supported
  Firefox ✓ Supported
  Safari ✓ Supported
  Microsoft Edge ✓ Supported
  IE* ✓ Supported

* IE 11 or above. Must be on Windows 8.1 or above.


Operating System Browsers Status
Android Firefox ✓ Supported
  Chrome ✓ Supported
iOS Safari* ✓ Supported
  Firefox ✓ Supported
  Chrome ✓ Supported

* iOS support has some limitations:

  • The playback does not start automatically after transfering playback. The user must interact with the SDK events to play audio.
  • The SDK does not work when the browser is running in the background.

This SDK must not be used in commercial projects without Spotify’s prior written approval. By using Spotify developer tools, you accept our Developer Terms of Use. They contain important information about what you can and can’t do with our developer tools. We highly suggest getting familiar with our Developer Policy and Complying with Spotify’s developer policy. Please read them carefully.