Spotify Authentication auth_service_unavailable

Viewed 517

I am trying to login to spotify. Although when the app is installed it always throws an AUTHENTICATION_SERVICE_UNAVAILABLE error. If the app is uninstalled the default Webview opens where the login works fine. Wished behaviour is, that the app opens and the user can login from there.

    public void doSpotifyLogin(boolean trySpotifyAgain) {
    this.trySpotifyAgain = trySpotifyAgain;
    AuthorizationRequest.Builder builder =
            new AuthorizationRequest.Builder(CLIENT_ID, AuthorizationResponse.Type.TOKEN, REDIRECT_URI);
    builder.setScopes(new String[]{"user-read-private", "streaming", "playlist-read-private", "user-library-read"});
    AuthorizationRequest request = builder.build();

    AuthorizationClient.openLoginActivity(this, SPOTIFY_LOGIN_REQUEST_CODE, request);
}

This is the response I am getting from the API:

2021-12-22 11:36:29.802 5069-5069/? I/com.spotify.sdk.android.auth.LoginActivity: Spotify auth completing. The response is in EXTRA with key 'response'
2021-12-22 11:36:29.822 5069-5069/? D/StartActivity: Spotify error: AUTHENTICATION_SERVICE_UNAVAILABLE

If you need any further information, please let me know! Thanks in advance

2 Answers

Ronze's comment worked for me. I needed to update my app's package name on developer.spotify.com.

For me, the issue got resolved after I added the SHA1 key generated on a new mac to the Spotify app dashboard

Related