I want to develop application where i can listen songs from spotify without login into it.like we search from soundcloud and play it.
i had implemented API for searching tracks
https://api.spotify.com/v1/search?q=Muse&type=track,artist&market=US
it provides me list of tracks now how can i play it without login.
the response is look likw below
{
external_urls: {
spotify: "https://open.spotify.com/artist/12Chz98pHFMPJEknJQMWvI"
},
followers: {
href: null,
total: 1856949
},
genres: [ ],
href: "https://api.spotify.com/v1/artists/12Chz98pHFMPJEknJQMWvI",
id: "12Chz98pHFMPJEknJQMWvI",
images: [
{
height: 667,
url: "https://i.scdn.co/image/0b3c04473aa6a2db8235e5092ec3413f35752b8d",
width: 1000
},
{
height: 427,
url: "https://i.scdn.co/image/cf54c2d4a4549fb484862a9c475fc897bb5ce707",
width: 640
},
{
height: 133,
url: "https://i.scdn.co/image/837c977024362a7f6d1873027e2a8664e21f911a",
width: 200
},
{
height: 43,
url: "https://i.scdn.co/image/0b14ff7b9c9fcfaf6b662fe439576c531b0aa8d8",
width: 64
}
],
name: "Muse",
popularity: 81,
type: "artist",
uri: "spotify:artist:12Chz98pHFMPJEknJQMWvI"
},
I implemented a Spotify player this summer, and indeed you have to use their SDK (https://github.com/spotify/ios-sdk).
Without logging in you can only play the 30 second previews of the songs, only when you are logged in you can play the full songs. The previews can (have to) be played with the iOS audio classes, the full songs when logged in have to be played with the SDK's own player.