2

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"
},
Janak LN
  • 138
  • 2
  • 15
  • Yes, Thank ´s Eric D for his point... Like he said... There ist no music url... in your JSON... Just images... Thanks Eric – Dennis Weidmann Nov 19 '15 at 14:17
  • @Neo You're welcome. Actually I think OP has to use the Spotify SDK with auth keys to listen to tracks, but I couldn't find a reference for this. Maybe it's possible to listen to the free ones without the SDK but it won't work anyway with just these links from OP's response. – Eric Aya Nov 19 '15 at 14:19

1 Answers1

1

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.

TheEye
  • 9,280
  • 2
  • 42
  • 58