Skip to content

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

@GitHubHQ

Description

@GitHubHQ

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions