This is a proof-of-concept for integrating Spotify in a Custom Tile.
This is one of several sample tiles that were built as part of the Custom Tiles release and is not intended to be a fully polished tile. Please feel free to learn from it, copy from it, or play with it.
If you’d like to give it a quick try, you can use my demo app for authorizing your Spotify account (can be revoked anytime), but please note that I am not actively maintaining the authorization app as it’s just for this demo purpose.
Go to https://spotify-demo-auth.glitch.me, and follow the instructions to authorize this demo app to access your Spotify account and take a note of the Refresh Token.
Tap the import button above to import the Spotify Custom Tile into your SharpTools account.
Tap Preview at the bottom of the editor and enter the Refresh Token from the first step.
Tap on the available devices button to select a device first then select the desired playlist to play.
Please note that this demo code uses Spotify Web APIs, and some of the player control APIs, such as play/pause, skip and prev, require the Spotify Premium account. See Spotify Web API Reference for more details.
The source code and detailed steps for creating your own Spotify app and retrieving
access token and
refresh token can be found here, and please note that this is just a proof-of-concept/demo, and is not an official integration.