Skip to content

UserNotAuthorizedException from new application and no Auth View or flow #380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
GitHubHQ opened this issue Apr 22, 2025 · 0 comments
Open

Comments

@GitHubHQ
Copy link

GitHubHQ commented Apr 22, 2025

Going through the android quickstart tutorial with a brand new app, like many other posters here with no working solutions, I am getting the following error:

com.spotify.android.appremote.api.error.UserNotAuthorizedException: {"message":"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"}

I have registered an application in spotify dashboard and:

  1. using the clientId
  2. whitelisted a redirect uri of the format someprefixhere://callback and am using that in the code as well (copy pasted so guaranteed to match)
  3. added my package name (applicationId) as well as my SHA1 fingerprint (via debug signing config)
  4. Set showAuthView(true)
  5. Followed the rest of the tutorial to call SpotifyAppRemote.connect(...) onCreate and on a button press

With the above setup, no matter how many times I try I get the error I mentioned and no auth flow is ever shown.

I have tried the sample app which does work, and copied over all the credentials including client id, redirect uri, SHA1 fingerprint and package name, but that does not work when used in my application.

I have also tried to use the Authorization library, which IS able to show the authorization flow SOMETIMES, but only if I use a properly formatted url for redirect uri such as https://example.org/callback rather than the deeplink schema, and only after i force stop the spotify app.

Furthermore, after authorization via auth library, the app remote library works as expected in terms of media controls/playback

Any help is appreciated T-T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant