Custom Spotify App

Posted on by admin

Difficulty Level : Intermediate

License Requirement : Community Plan or Power Apps / Power Automate per app or per user plan

Spotify allows users to play music directly from the cloud instead of first downloading it. Spotify became popular as a startup and giving tough competition to Apple’s iTunes. Having in demand, people are thinking to develop app like Spotify that has more than 30 million tracks and save some prestigious holdouts like The Beatles. The app provides a lot of customisation options but the documentation is not upto the mark. The backend is extremely confusing and outright illogical in certain areas. For example, you can not create a product using Shopify's backend. To enable customisation in a product, you. Spotify Design are a cross-disciplinary product design community. We love to create great experiences and make meaningful connections between listeners and creators. Here is where we share what we do and how we do it. I built a web app to generate a Spotify playlist based on selected tracks and custom preferences.

Custom Spotify App Android

If you are not interested in the inception of this, skip the very interesting story and just jump to Let’s Create.

This whole idea started when I was on a road-trip from Cincinnati to Orlando with my #FlowFam ( Jon Levesque, Anton Robbinsand Ed Gonzalez). We had more than 12 hours to spend and to make the most out of it we could only do one thing – Make a flow!

The flow had to be something around the road trip and we wanted to involve the community so that they felt like they were a part of it. So, we thought what if we could create a flow which when triggered manually, takes the geo location and the song that we are currently playing on Spotify and posts it on Twitter. And 1 hour later –

To take it to the next level, we created a flow to accept song requests from twitter , which we received as approvals (as some people were rick rolling us) and then as we hit on approve, it played the song right then. To see all this in action, watch this video from Jon who vlogged the whole story –

When I built the flow (in the backseat of the pickup) I couldn’t make the best optimized version of it. I actually wanted to use a custom connector, however, for some reason that wasn’t working correctly and that’s why we had to use HTTP actions in flow and I had to generate a refresh token every hour and change it in the flow.

Let’s create

In this blog post, we will create a custom connector to connect to the Spotify API and use it to search for tracks, play a sound track and get the current playing track.

  • Step 1 – Register an app on Spotify
  • Step 2 – Create a custom connector
  • Step 3 – Use in Power Automate and Power App

If you are thinking about not doing this because custom connectors are premium, WAIT! You can create a community plan for your personal use for free!

Step 1 – Register an app on Spotify

If you don’t have Spotify premium, you can still use the custom connector , however, you won’t be able to play specific tracks. So, I would highly recommend getting the free trial.

Follow the steps below to create an app on the Spotify developer portal –

Once you have created the app, you can copy the client id and client secret and paste it in notepad or whatever you think is a secure place (probably a sticky note pasted on your monitor)

Step 2 – Create a custom connector

Free

If you don’t know anything about custom connectors or APIs , don’t worry! I didn’t know anything about it a year ago (and yes I still call myself That API Guy)

First, go to either make.powerapps.com or flow.microsoft.com and log in with your credentials. Click on custom connectors in the left navigation menu.

Next, click on New custom connector -> Create from blank. Then enter a name for the connector and click on continue.

Now, you will see a wizard kind of experience with 4 steps, each of which I have described below with the screenshots.

In the security tab, use these values-

  • For Authorization URL : https://accounts.spotify.com/authorize
  • For Token and Refresh URL : https://accounts.spotify.com/api/token
  • Redirect URL – This will be generated after you click on create connector.
  • For Scope : user-read-currently-playing user-modify-playback-state playlist-modify-private playlist-read-collaborative playlist-read-private user-read-playback-state

Scope defines what permissions you want to give to you to your Spotify app. For this blog post, the scope above will be sufficient for all the actions that we want to perform. You can add / modify this later based on your requirement.

If you select Spotify under the identity provider, it messes up the scope and doesn’t prompt you to allow for all permissions that you entered in the scope. So, don’t select it please.

Click on create connector. You will now see that the redirect URL has been created. Copy it and paste it on your Spotify app’s settings and save it.

For the Definition step, let’s create an action to get the current song playing on Spotify. We will try some other API endpoints at a later stage.

Next, click on “Import from Sample” under the Request section to define the endpoint we

Click on “Update Connector” and then go to the last tab ‘Test”.

You will have to create a new connection to test your custom connector.

A window will pop-up asking you to log in to Spotify (if you aren’t already logged in to it in that same browser window). Once you log in, you will be asked to allow the Spotify app all the permissions that we entered in the scope. Click on agree the same way you would do for all the random apps in the world, at-least this an app that you created. You can TRUST this one! 🙂

Once you click agree, the connection will be created and weirdly you will be redirected to the Connections page. You would think that it would stay on the same page and allow you to test, however, not everything comes that easy I guess. Anyways, now that you are on the connections page, just search for Spotify and check if connection was created.

Now, go back to Custom connectors page and click on edit, and go to the ‘Test’ section. You will now see the connection that you just created in the Connections drop-down list. All that is left to do is to click on ‘Test Operation”! Before you do that, play a song on your Spotify.

Here’s a demo –

👍 Wow! that must feel good to get that working. That’s just the start though.

Here are some more actions (API endpoints) to have fun with this connector. You can create a lot more from using this API reference doc.

Step 3 – Use in Power Automate and Power App

Now that you have the custom connector created, let’s use it in a flow and app.

  1. In a flow – We will create a flow to search for a christmas song and play the first one from the list of results.

This is the expression I used to get the track id from the JSON response from the Search for tracks action –

Let’s see it in action now –

2. In a Power App – Let’s make this one a challenge. Create a Power App with this custom connector and tweet a demo of it on Twitter with the hashtag #PowerPlaySpotify and I will do something special for you!

Here’s some inspiration –

There is a lot more that you can do with this connector, especially for the holiday season. So go create this and tweet about it with the #PowerPlaySpotify . I would love to see your creativity with it.

Spotify App For Android

Note: If you do end up using other actions / endpoints, make sure to check if the scope required for that endpoint is included in the Scope under security.

Enjoy and Happy holidays!

Custom Spotify App Free

Occasionally, you'll need to manually add a podcast to your app.

Most podcast players include a directory of podcasts that allow you to search and find the show you want. But, if you need to add a private podcast feed or a podcast that hasn't submitted their feed to Apple, Google, or Spotify for indexing, you'll need to do it yourself.

Note: this article is intended for podcast listeners. If you're a podcaster looking to submit your podcast to directories, follow these guides.

You can't currently manually add podcast RSS feeds to these apps:

  • Spotify

  • Stitcher

  • Castbox

  • Google Play

  • Google Podcasts

  • iHeartRadio App

How to manually subscribe to a podcast

Copy the podcast's feed URL to your clipboard. You'll also find this on a podcast's web page. Here's an example from The Bigs podcast:

How to add RSS feed in Apple Podcasts (iOS)

  1. Click the Library icon (bottom of the screen).

  2. Click the 'Edit' link in the upper-right hand corner.

  3. Click 'Add a Podcast by URL.'

  4. Paste in the podcast's RSS feed.

Apple Podcasts is automatically included on your iPhone.

How to add RSS feed in Overcast (iOS)

  1. Click the '+' symbol in the upper-right hand corner.

  2. Click 'Add URL' in the upper-right-hand corner.

  3. Paste in the podcast's RSS feed.

You can download Overcast here.

How to add RSS feed in Pocket Casts (iOS and Android)

  1. Click 'Discover' at the bottom of the screen.

  2. Paste in the podcast's RSS feed in the search tab (and click 'Enter').

  3. Click Subscribe.

Download Pocket Casts here.

How to add RSS feed in Podcast Republic (Android)

  1. Click the three dots in the upper-right-hand corner.

  2. Click “Add Podcast” and paste in the podcast's RSS feed.

  3. Click 'Find Podcast.'

Spotify

Download Podcast Republic.

How to add RSS feed in Podcast Addict (Android)

Spotify Custom Apparel

  1. Click the '+' symbol in the upper-right-hand corner.

  2. Click “Add RSS Feed” and paste in the podcast's RSS feed.

  3. Click 'Add.'

Download Podcast Addict.

Want to start a podcast?

At Transistor, our goal is to guide you through the confusing podcasting landscape. Ultimately, you want to record your audio, and then get that audio onto platforms like Apple Podcasts and Spotify. We provide the hosting and analytics tools you'll need, but more than that, we'll help answer your questions with our live chat and guides.

Try podcasting on Transistor for free

Start a 14-day trial

What does Transistor provide?

Transistor gives you everything you need to get your podcast on Spotify, Apple Podcasts, and Google:

  • A podcast-ready RSS feed
  • Unlimited storage and bandwidth for your audio files
  • Global CDN for your audio files
  • Customizable podcast website
  • In-depth analytics
  • Embeddable audio player
  • Support for multiple users
  • Integrates with MailChimp, ConvertKit, and Drip.