Spotify for Developers

Spotify for Developers

Episode Four

Spotify for Developers allows developers to create applications using Spotify's 100 million songs, 5 million podcasts and more. Learn about what features are available along with an SDK for .NET developers and more about Spotify for Developers.

Intro

Welcome to RoguePlanetoid podcast where each episode you can find insights for developers, whether you are a beginner or an experienced professional for Microsoft and related platforms, along with related technology and so much more to help Keep Current, Keep Coding.

Welcome

I'm Peter and welcome episode four of the RoguePlanetoid Podcast about Spotify for Developers. It has been great to see more people than ever are listening to the podcast so thanks to each and every one of you out there that has chosen to listen to the RoguePlanetoid Podcast I really appreciate it! Spotify for Developers although not from Microsoft is supported by many developers using Microsoft's .NET platform including myself as I have used it in a few .NET projects I have created and workshops, the most recent of which was Blazorfy which combined Blazor from Microsoft and Spotify for Developers, you can find this workshop at tutorialr.com/workshops/blazorfy or check out the link in the show notes.

Spotify for Developers

Spotify for Developers allows developers to create applications using Spotify's 100 million songs, 5 million podcasts and more. If you want to read about Spotify for Developers you can also check out the companion article to this episode on the RoguePlanetoid website at rogueplanetoid.com/articles/spotify-for-developers or check out the link in the show notes.

Spotify is where you can find music you love or discover something new or listen to podcasts like the RoguePlanetoid Podcast and so many more from your phone, computer, tablet or smart speaker and you can sign up for free or find Spotify by visiting spotify.com or check out the link in the show notes.

Spotify for Developers allows developers to create applications that work with Spotify along with documentation. Spotify for Developers provides a Web API where you can amongst other things get metadata from Spotify content or control playback along with being able to try out endpoints directly from the documentation, an Ads API that allows you to build, manage and get reports on Spotify Ad Studio campaigns and a Web Playback SDK that allows you to stream Spotify content from inside web applications. iOS and Android Developers can take advantage of SDKs that allow your application to interact with the Spotify app running in the background as a service or Web Developers can use Embeds to share interactive content from Spotify on a website they control. Commercial Hardware from approved partners can take advantage of Spotify using the Spotify Embedded Software Development Kit to allow them to integrate Spotify into smart speakers or other compatible devices to listen anywhere using Spotify Connect. Spotify for Developers also has Design guidelines to make sure integrations respect the Spotify brand correctly or Accessibility guidelines to help make sure your applications are accessible to everyone along with a community with blog posts and podcast episodes directly from Spotify along with being able to talk with the Spotify team and fellow developers on a discussion forum. To find out more about Spotify for Developers visit developer.spotify.com or check out the link in the show notes.

Spotify for Developers Web API allows developers to get metadata from content on Spotify such as albums or podcasts, you can also create or manage playlists, and can you control playback such as pause or repeat. Authorisation flows supported include Authorisation Code for server-side applications, Authorization Code with Proof Key for Code Exchange for client-side applications, Client Credentials for server-side non-user information and finally Implicit Grant Flow which is still supported but not recommended for security reasons and Authorization Code with Proof Key for Code Exchange should be used instead. Documentation is available that explains all the authorisation flows along with a reference which fully documents the requests that can be made to the Web API including Get New Releases, Get Artist's Top Tracks, Get an Audiobook, Get Single Browse Category, Get a Chapter of an Audiobook, Get Several Episodes of a Podcast, Get Available Genre Seeds, Get Available Markets, Get Playback State, Create Playlist, Search for Item, Get User's Saved Shows for Podcasts they follow, Get Track's Audio Features and Get User's Profile using Spotify for Developers. To find out more about the Web API visit developer.spotify.com/documentation/web-api or check out the link in the show notes.

Spotify for Developers allows developers to create an app from the Dashboard to get the credentials needed for authorisation for an access token which can then be used in requests to the Web API, along with being able to see stats on users or endpoints and access settings such as adding Spotify users to allow them to access your application in development mode or request a quota extension once your application is ready for a wider audience. You can access the dashboard at developer.spotify.com/dashboard or check out the link in the show notes.

Spotify for Developers Ads API allows developers to build, manage or report on campaigns on Spotify using Ad Studio. Developers can allow users to authenticate using their Ad Studio account using OAuth to then allow them to interact with the Ads API. Documentation is available that explains authorisation along with a reference which fully documents the requests that can be made to the Ads API including Get Ad Accounts, Create Ad Set, Get Ads, Update Advertiser, Get Image Assets, Get Campaigns, Get Audience Estimate, Create Report and Get Genre Targets. To find out more about the Ads API visit developer.spotify.com/documentation/ads-api or check out the link in the show notes.

Spotify Ad Studio is a self-service advert manager that allows businesses to reach millions of listeners on Spotify, you can quickly start a campaign which can use licenced background tracks, voice actors and professional audio mixing for free or use your own creative. You can target listeners based on demographics or their interests and behaviours along with being able to set goals for a campaign, tune any targeting or optimise a campaign and measure any success all within Ad Studio, to find out more visit adstudio.spotify.com or check out the link in the show notes.

Spotify for Developers Web Playback SDK is a JavaScript library that allows developers to create a player that can stream Spotify content from a web application within a browser along with controlling and getting metadata of the current playback. Web Playback SDK is supported in most modern browsers on mobile and desktop and creates a new player in Spotify Connect where you can play audio from Spotify within a web application. Documentation for the JavaScript Library is available that explains all the features including being able to adjust volume, pause, resume, seek, skip to the previous item or next item being played and more. To get or find out more about the Web Playback SDK visit developer.spotify.com/documentation/web-playback-sdk or check out the link in the show notes.

Spotify for Developers Android and iOS SDKs allow applications to interact with the Spotify application in the background on those devices and allow application to offload functionality to the main Spotify application such as such as getting metadata for playback and basic playback commands on Android or control playback, perform authentication and support offline caching on iOS. Documentation for both SDKs is available including how to get started, tutorials along with reference material. To find out more about the Android SDK visit developer.spotify.com/documentation/android and the iOS SDK visit developer.spotify.com/documentation/ios or check out the links in the show notes.

Spotify for Developers Embeds allow any web developer to add audio content to their own websites such as a podcast, album or other audio content that can be used to promote new music, share latest podcast episodes or just share a favourite album or playlist. This can be as simple as copying a few lines of HTML from within the Spotify application or developers can take advantage of an iFrame API to create web applications that dynamically load, play and pause content and an oEmbed API to allow a website to handle Spotify links that have been shared by users. Embeds have full documentation available including tutorials and reference, you find this and more at developer.spotify.com/documentation/embeds or check out the link in the show notes.

Spotify for Developers Commercial Hardware supports devices that integrate Spotify's Embedded Software Development Kit available for approved partners wanting to create devices that allow listeners to connect to their device with Spotify Connect. The Embedded SDK includes all the functionality needed to integrate Spotify Connect on a device which could be a smart display, smart speaker or similar device which can then allow a user to transfer their playback to the device and they can control playback on this device such as pause, skip, volume and more. To find out more about creating Commercial Hardware for Spotify with Spotify for Developers then visit developer.spotify.com/documentation/commercial-hardware or check out the link in the show notes.

Spotify for Developers Guidelines for Design and Accessibility are available to assist developers when creating their applications. Design guidelines help make it easier to integrate Spotify content into an application while respecting their brand and any legal or licensing restrictions and ensure that users get the same experience regardless of the platform, this includes how to use the Spotify logo, icon and colour schemes along with how to display content from Spotify and more. Accessibility guidelines help create applications using Spotify regardless of the way they are used or how devices are interfaced with, including alt-text in images, colour contrast and more. Spotify for Developers Design Guidelines can be found at developer.spotify.com/documentation/design and Accessibility Guidelines at developer.spotify.com/documentation/accessibility or check out the links in the show notes.

Spotify for Developers Community is where you can read the latest posts, ask questions on the discussion forum and get answers from the developer community or the Spotify team about Spotify for Developers. There is even a Spotify for Developers: On the Air podcast where you can listen to find out about best practices, how to best use Spotify for Developers and more. You can find out more about the Spotify for Developers Community at developer.spotify.com/community or check out the link in the show notes.

Spotify for Developers isn't my first experience of using a music service API, as I've been working with them off and on for the past few years, first starting with Zune from Microsoft which was their music service and hardware available at the time. Zune included the Zune Social which featured an embeddable flash-based widget known as a Zune Card that included recent or favourite tracks and more. Zune Cards used XML data which as a developer I used to create an application in Silverlight called ZuneCardr where you could export images of Zune Card data. I later repurposed this as a brand-new application that could display Zune Card information on Windows Phone 7 when that platform launched, without knowing this would be the only way you would be able to do that on Windows Phone 7, so the application proved very popular and gained over 330,000 downloads during the lifetime of the Zune service being available. Not only did this application display the information from the flash-based Zune Card but thanks to my investigation of Microsoft's undocumented Zune Marketplace API I was able to expand the capabilities of the application to allow full playback of music tracks, enabled by the Zune Pass music subscription service that was also available at the time, this combined with the Zune Card information allowed the application to provide features from the Zune service on the Windows Phone platform that Microsoft themselves never did. Zune was later replaced by Xbox Music but this time it not only had an official API with full documentation but also had a .NET SDK. I was able to use this SDK create a new application that brought back the original features of my ZuneCardr application to enable creation of images that could be shared of favourite tracks, albums and more from Xbox Music for Windows 10 and Windows 10 Mobile. However, during development Groove Music replaced Xbox Music but this brought more features and an improved SDK, so I was able to make the application even better. Groove Music itself however later also shut down, but there was to be no replacement this time from Microsoft and ended the era of music services from Microsoft and users were directed to migrate over to Spotify, including myself. This is where my journey with Spotify began which picked up right where Zune, Xbox Music and Groove Music had left off as all the music I wanted was also and I soon found they also had a music API via Spotify for Developers. One weekend I decided to take the Groove Music API and got it working with the Spotify Web API from Spotify for Developers instead, which I later further refined into a brand-new .NET Standard package designed specifically for the Spotify Web API called Spotify.NetStandard. I have continued to update and add new features to this package over the years and it has gained over 10,000 downloads, it supports all features of the Spotify Web API either with a stream-lined multi-purpose or per-endpoint implementation and is supported by the latest version of .NET or down-level to .NET Framework 4.8.1. Search for Spotify.NetStandard on NuGet or visit nuget.org/packages/Spotify.NetStandard or get full source code along with integration tests from github.com/RoguePlanetoid/Spotify-NetStandard or check out the links in the show notes.

Promo

Spotify for Developers isn't the only way you can use Spotify there is also Spotify for Podcasters, which hosts the RoguePlanetoid Podcast. I'm not getting paid to say it I just wanted to share that Spotify for Podcasters is a fantastic way that allows anyone to start their own podcast and host it for free, not only to be available on Spotify but also on other platforms such as Apple Podcasts, Google Podcasts and more! Podcasters can take advantage of exclusive features from Spotify to connect with fans with Q&A or polls and the ability to add songs from the Spotify music catalogue in your podcast plus you can even have a video podcast or create premium content on Spotify. If you have an idea for a podcast, or want to move your existing podcast, then why not join Spotify for Podcasters at podcasters.spotify.com or check out the link in the show notes.

Outro

Thanks for listening to the RoguePlanetoid podcast where you can find insights for developers, whether you are a beginner or an experienced professional using Microsoft and related platforms, along with related technology and so much more. You can also find any links in the show notes for this episode or visit rogueplanetoid.com/podcast for details of this episode and podcast. Keep Current, Keep Coding!

RoguePlanetoid Podcast is a production of cluarantonn.com

Hosted, Written, Produced and Edited by Peter Bull

Music based on Like a Tiger by Jo Wandrini

Production Company Name by Granny Robertson