I’m working on an Android application and want to integrate with Spotify’s services. From what I can see, most tutorials point to using the Spotify Android SDK, but this seems to require users to have the official Spotify app installed on their device.
My use case is pretty simple - I only need to fetch basic data like music genres and user playlist information. I don’t need any audio playback features or complex functionality.
I’ve been looking into using the Spotify Web API directly instead of the Android SDK. Has anyone successfully implemented this approach? I attempted to make direct HTTP requests to the web endpoints, but most of the official guides seem to push developers toward the SDK route.
Would appreciate any insights on whether the web API can be used independently in Android apps, or if there are any limitations I should be aware of when taking this approach instead of using their mobile SDK.
Yes, you can totally use Spotify’s Web API without their Android SDK. I built a music discovery app last year that pulled playlist data and track info using just REST calls. The tricky part is authentication - I went with PKCE (Proof Key for Code Exchange) since it’s more secure for mobile apps than standard auth code flow. Watch out for rate limiting though. The Web API has stricter limits than SDK integration. For grabbing genres and playlist info like you want, the Web API is actually easier. You skip all the messy audio session management stuff from the SDK. Just store your access tokens securely and handle refresh tokens properly.
Totally doable! I’ve pulled this off before on a Spotify data project. Skip the SDK - just use OkHttp or Volley for API calls and handle OAuth through WebView or Chrome Custom Tabs. You’ll need to register your app in Spotify’s dev dashboard and set up client credentials properly. Works great for basic data pulls like you’re describing.
Using Spotify’s Web API in your Android application is definitely a viable option without needing the Spotify app installed. I have implemented this method in a couple of applications to retrieve data like music genres and user playlists successfully. The key aspect to manage is the OAuth authentication process. You can utilize a WebView or custom tabs to implement the authorization code flow, after which making the required HTTP requests becomes straightforward with libraries like Retrofit or OkHttp. While it may take a bit more effort to set up authentication compared to the SDK, it provides greater flexibility for your use case since you don’t require audio playback functionalities.