I’m building an Android application that integrates with Spotify’s SDK. Everything works great when I test it on the emulator - I can authenticate users and play music without any problems. But when I try running the same code on my actual phone, I get an INVALID_APP_ID error.
The weird thing is that if I completely remove the Spotify app from my phone first, then my app works fine and can play music. It only breaks when the official Spotify app is installed on the device.
Has anyone else run into this issue? How can I make my app work properly even when users have Spotify installed?
Had the same annoying issue last year. It’s almost always your app’s package signature and how you’ve got it set up in the Spotify developer console. When the official Spotify app is installed, it gets way pickier about validating your signature. Make sure you’ve added your debug keystore fingerprint to your Spotify app settings if you’re testing in debug mode. For production, you’ll need the release keystore fingerprint instead. Also check your redirect URI - it has to match exactly between your code and the developer dashboard. I’ve found that clearing your app’s data and re-authenticating after installing the official Spotify app usually fixes the conflict. The SDK docs mention this but it’s buried and easy to miss.
This happens because Spotify’s SDK and main app clash when they’re both on your device. The authentication flow gets confused and throws the INVALID_APP_ID error. I hit this exact issue about six months ago while developing. Fixed it by updating my app’s manifest file to properly handle Spotify package interaction. You’ll need to add a queries element in your AndroidManifest.xml so your app can actually talk to the Spotify app. Android’s package visibility restrictions block proper SDK initialization without this declaration when the main app’s installed. Also, double-check your CLIENT_ID in the Spotify developer dashboard matches exactly what’s in your code - watch for trailing spaces or hidden characters. The validation gets way stricter when the official app’s present.
INVALID_APP_ID errors with music APIs are such a headache. Your SDK can’t figure out which app should handle auth when both yours and Spotify’s are installed on the same device.
Skip the manifest and signature debugging - I’d just automate the whole thing with Latenode. It handles API auth and tokens for you, so you don’t get these device conflicts.
Your app hits Latenode’s endpoints instead of Spotify’s SDK directly. No more conflicts. Token refresh and error handling are built in too. I’ve used it on multiple projects and haven’t seen INVALID_APP_ID since. Setup’s quick and you’ll save hours of debugging.