Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build your first Spotify App

Build your first Spotify App

Alvaro Navarro

January 24, 2022

More Decks by Alvaro Navarro

Other Decks in Technology


  1. Widgets Embeddable view of a track, artist, album, user, playlist,

    podcast or episode for use within your web project
  2. A client-side JavaScript library to create a new Spotify Connect

    player on your browser. Web Playback SDK
  3. Web API RESTful APIs +70 endpoints to fetch metadata about

    music, artists, albums or tracks Allows to interact with user data, playlists and playback Authentication with OAuth 2.0
  4. Build our first Spotify App - What is Spotify API

    - Web API Authorization - Make our first API call - Build a simple recommendation app - Next steps Agenda
  5. Spotify Web API Fetch Spotify catalog info - Search and

    browse Spotify's catalog of artists, albums, tracks, podcasts, etc. - Rich metadata available: from album cover images to track danceability - 30 seconds preview URIs can be retrieve
  6. Spotify Web API Control Playback - See what's playing on

    your Spotify account and on which device - Start or stop playback, queue up tracks or podcast episodes, seek within a track or adjust playback volume
  7. Spotify Web API Manage your Spotify account - Create or

    edit playlists, save tracks and episodes, and upload playlist cover art - Follow or unfollow artists and other Spotify users
  8. Spotify Web API Retrieve analytics and recommendations - Produce a

    set or recommendations given a set of seeds - Retrieve your recently played tracks, and top tracks in the short and long term
  9. Web API Authorization Three recommended options - Authorization Code Flow

    - Authorization Code Flow with PKCE - Client Credentials Flow OAuth 2.0 allows you to fetch an access token that you'll need to call the API.
  10. Web API Authorization When to use each flow? - Authorization

    Code Flow: long-running apps on the server - Authorization Code Flow with PKCE: mobile apps or front apps - Client Credentials Flow: daemon/cli running on the backend
  11. Next steps - Code improvements - Integrate Web Playback SDK

    + Player APIs to play music within the browser - Improve the seed/input for the recommendation algorithm