Michael
Michael

Reputation: 3239

Is there a way to search for songs using the Spotify API with a non-premium account but not play them?

I am looking into developing an Android app which used the Spotify API. From their tutorial found here: https://developer.spotify.com/technologies/spotify-android-sdk/tutorial/, you must sign in as a premium user in order to play the song. I looked more into how this worked, and it involves setting the scope using this line:

builder.setScopes(new String[]{"user-read-private", "streaming"});

The "streaming" scope requires a premium account. I searched through this page which has all of the scopes: https://developer.spotify.com/web-api/using-scopes/ and I was wondering which one would be used if I want to JUST search for a song and not play it. Is this possible to do with a free account?

Thanks in advance!

Upvotes: 0

Views: 3042

Answers (1)

wml
wml

Reputation: 56

According to the page you linked:

If no scope is specified, access is permitted only to publicly available information: that is, only information normally visible to normal logged-in users of the Spotify desktop, web, and mobile clients (e.g. public playlists).

After removing the "streaming" scope, I believe you be able to search for songs. That being said, the Spotify Web API endpoints for search say that you don't need authentication to search. You can try out an unofficial Spotify web API wrapper to make this a bit easier.

Upvotes: 3

Related Questions