Skip to content

UserNotAuthorizedException when using connect interface after successful authorization #363

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
pie-tk opened this issue May 28, 2024 · 2 comments

Comments

@pie-tk
Copy link

pie-tk commented May 28, 2024

Thanks for your interest in the Spotify App Remote SDK!
If you're submitting a bug, please use the following template.
If your issue is a feature request, please include your use-case so that we have all the necessary info.

Issue found on May 28, 2024.

SDK Version:

spotify-app-remote-release-0.8.0 and spotify-auth-release-2.1.0

OS Version:

Android 10

Scope(s):

Successfully connecting to Spotify

Steps to reproduce:

1.Attempt to connect to Spotify using the connect interface.
2.Receive 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"}.
3.Use AuthorizationClient.openLoginActivity to authorize the user.
4.Successfully receive the TOKEN indicating authorization is complete.
5.Attempt to connect again using the connect interface.
6.The connect interface still returns the error: com.spotify.android.appremote.api.error.UserNotAuthorizedException.

Expected behaviour:

After successful authorization, the connect interface should connect without returning a UserNotAuthorizedException error.

Actual behaviour:

Even after successful authorization and receiving the TOKEN, attempting to connect using the connect interface results in com.spotify.android.appremote.api.error.UserNotAuthorizedException.
Please provide any additional information that may be helpful in resolving this issue. Thank you.

@pie-tk
Copy link
Author

pie-tk commented May 29, 2024

I need to add that my application is signed on the Android system. Will this have any impact?

@azrdev
Copy link

azrdev commented Jan 18, 2025

If your app is in "developer mode" you not only have to whitelist all (up to 25) spotify accounts that may use it, but also save the SHA1 hash of the key signing the app in the developer portal

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

2 participants