Skip to content
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

Create session with spotify token failed #753

Open
basicemotions opened this issue Oct 25, 2023 · 0 comments
Open

Create session with spotify token failed #753

basicemotions opened this issue Oct 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@basicemotions
Copy link

Describe the bug
I try to create player session using AuthenticationType.AUTHENTICATION_SPOTIFY_TOKEN, but it throw exception
xyz.gianlu.librespot.mercury.MercuryClient$MercuryException: status: 403
When i use username and password for session it works fine.

To Reproduce

Session.Builder sessionBuilder = new Session.Builder(conf);
sessionBuilder
                .credentials(
                        Authentication.LoginCredentials.newBuilder()
                                .setTyp(Authentication.AuthenticationType.AUTHENTICATION_SPOTIFY_TOKEN)
                                .setUsername(profilePrefs.getProfile().getId())
                                .setAuthData(ByteString.copyFrom(tokenPrefs.getToken(), StandardCharsets.UTF_8))
                                .build()
                )
                .setPreferredLocale(Locale.getDefault().getLanguage())
                .setDeviceType(Connect.DeviceType.SMARTPHONE)
                .setDeviceId(deviceId)
                .setDeviceName(deviceName);
playerSession = new WeakReference<>(sessionBuilder.create());

Expected behavior
player session created succesfull

Screenshots/Stracktraces/Logs
Screenshot 2023-10-25 at 17 19 55

Version/Commit
v1.6.3

@basicemotions basicemotions added the bug Something isn't working label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant