Announcements

Help Wizard

Step 1

NEXT STEP

Misleading “Explicit user authorization is required” error when app fingerprint is outdated

Misleading “Explicit user authorization is required” error when app fingerprint is outdated

After beating my head for two weeks on the authorization error "Explicit user authorization is required to use Spotify. The user has to complete the auth-flow to allow the app to use Spotify on their behalf.", while my app was authorizated, I finally figured out what was causing this (misleading) error, and wanted to share it here, in case anyone else runs into it.

To use the AppRemote functionality of the spotify SDK you need to authorize your application. If your app is not authorized you will get an error: `Explicit user authorization is required to use Spotify. The user has to complete the auth-flow to allow the app to use Spotify on their behalf"⁩⁩⁩⁩⁩⁩`

However this error also triggers if the authorization was succesful, but Spotify is not able to report this back to you due to an incorrect/outdated App Fingerprint on the Spotify dashboard. The tricky thing here is that it looks like your app has been authorized, this means that: If you open the app you will be redirected to the Spotify Authorization screen where you can connect. The callback is succesfully performed and if you look in your spotify account under the "connceted apps" page you will see your app listen as a connected and authorized app. However if the fingerprint is mismatched this authorization does not get reported to your app, causing the above error to trigger (because, as far as your app is concerned, it isn't authorized since it doesn't get communicated to it).

Usually you do the setting up of your app domain and fingerprint once at the very start of your project when filling in the app information in the spotify dashboard, so if your fingerprint changes later on (as it did for me when I added a signature to my build) it is quite hard to retrace this. For me it worked for several months, and it seemingly "randomly" stopped working while I had not touched any of the authorization code in a while. 

I have created a GitHub issue for it on the spotify/android-sdk page #384, however it seems like those arn't being actively tracked. But hopefully this error message can be improved.

Reply
0 Replies

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random