2
votes

I want to create a custom playlist for a Yoga session and want it to be played using our app. I also need to skip some tracks of the playlist when it reaches some certain time interval.

I have tried using Spotify Web API to create a Playlist with custom tracks. But when attempting to use the https://api.spotify.com/v1/me/player/play Endpoint for the required context uri, it throws error for being NON PREMIUM. I have ensured all the Scopes are being used. So is there no way to stream without being a premium user ?

Alamofire.request("https://api.spotify.com/v1/me/player/play", method: .put , parameters: parameters, encoding: URLEncoding.httpBody , headers: headers).responseJSON { response in
            print("-- USER Playlists Custom --")
        }


error =     {
        message = "Player command failed: Premium required";
        reason = "PREMIUM_REQUIRED";
        status = 403;
}
1

1 Answers

0
votes

Indeed, as the message states music playback via the Spotify API only supports those with a Premium Subscription - you'll need to sign up for one, usually (depending on territory) Spotify offers at least one month free to start with so you could try that but without a premium subscription you won't be able to stream music.