title: spotify authentication failure
body: <p>I am following the Spotify tutorial on android sdk beta22-noconnect-2.20b to just get the groundwork on an app that I want to to write and I am having trouble getting my application to authenticate. I am sure that I have signed my app and inserted the correct fingerprint into the &quot;My Applications&quot; tab on spotify. My URI is correct. I am also fairly certain that I followed the tutorial 100% properly. Every time I run the program I get this error.</p>
  <blockquote>
  <p>I/OpenGLRenderer: Initialized EGL, version 1.4</p>
  <p>D/OpenGLRenderer: Swap behavior 1</p>
  <p>D/com.spotify.sdk.android.authentication.LoginActivity: <a href="https://accounts.spotify.com/authorize?client_id=7c59d84c8b7f4e35b3c85a7a5289db1b&amp;response_type=token&amp;redirect_uri=spotifymixer%3A%2F%2Fcallback&amp;show_dialog=true&amp;scope=user-read-private%20streaming" rel="nofollow noreferrer">https://accounts.spotify.com/authorize?client_id=7c59d84c8b7f4e35b3c85a7a5289db1b&amp;response_type=token&amp;redirect_uri=spotifymixer%3A%2F%2Fcallback&amp;show_dialog=true&amp;scope=user-read-private%20streaming</a></p>
  <p>D/SpotifyAuthHandler: start</p>
  <p>D/com.spotify.sdk.android.authentication.LoginActivity: Error authenticating</p>
  <p>D/SpotifyAuthHandler: stop</p>
  </blockquote>
  <p>I don't know how to proceed. Could I have used an incorrect signature for the program?</p>
  <p>My MainActivity.java:</p>
  <pre><code>package com.example.mammo.spotifyplayer;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.util.Log;
  import android.view.View;
  
  
  import com.spotify.sdk.android.authentication.AuthenticationClient;
  import com.spotify.sdk.android.authentication.AuthenticationRequest;
  import com.spotify.sdk.android.authentication.AuthenticationResponse;
  import com.spotify.sdk.android.player.Config;
  import com.spotify.sdk.android.player.ConnectionStateCallback;
  import com.spotify.sdk.android.player.Error;
  import com.spotify.sdk.android.player.Player;
  import com.spotify.sdk.android.player.PlayerEvent;
  import com.spotify.sdk.android.player.Spotify;
  import com.spotify.sdk.android.player.SpotifyPlayer;
  
  public class MainActivity extends Activity implements
      SpotifyPlayer.NotificationCallback, ConnectionStateCallback
  {
  
      // TODO: Replace with your client ID
      private static final String CLIENT_ID = &quot;7c59d84c8b7f4e35b3c85a7a5289db1b&quot;;
      // TODO: Replace with your redirect URI
      private static final String REDIRECT_URI = &quot;spotifymixer://callback&quot;;
  
      private Player mPlayer;
      private static final int REQUEST_CODE = 1337;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      AuthenticationRequest.Builder builder = new AuthenticationRequest.Builder(CLIENT_ID, AuthenticationResponse.Type.TOKEN, REDIRECT_URI);
  
      builder.setScopes(new String[]{&quot;user-read-private&quot;, &quot;streaming&quot;});
      AuthenticationRequest request = builder.build();
  
      AuthenticationClient.openLoginActivity(this, REQUEST_CODE, request);
  }
  
  public void tryAgain(View view){
      AuthenticationRequest.Builder builder = new AuthenticationRequest.Builder(CLIENT_ID, AuthenticationResponse.Type.TOKEN, REDIRECT_URI);
  
      builder.setScopes(new String[]{&quot;user-read-private&quot;, &quot;streaming&quot;});
      AuthenticationRequest request = builder.build();
  
      AuthenticationClient.openLoginActivity(this, REQUEST_CODE, request);
  
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
      super.onActivityResult(requestCode, resultCode, intent);
  
      if(requestCode == REQUEST_CODE){
          AuthenticationResponse response = AuthenticationClient.getResponse(resultCode, intent);
          if(response.getType() == AuthenticationResponse.Type.TOKEN) {
              Config playerConfig = new Config(this, response.getAccessToken(), CLIENT_ID);
              Spotify.getPlayer(playerConfig, this, new SpotifyPlayer.InitializationObserver() {
  
                  @Override
                  public void onInitialized(SpotifyPlayer spotifyPlayer) {
                      mPlayer = spotifyPlayer;
                      mPlayer.addConnectionStateCallback(MainActivity.this);
                      mPlayer.addNotificationCallback(MainActivity.this);
                  }
  
                  @Override
                  public void onError(Throwable throwable) {
                      Log.e(&quot;MainActivity&quot;, &quot;Could not initialize player: &quot; + throwable.getMessage());
                  }
              });
          }
      }
  }
  
  @Override
  protected void onDestroy() {
      Spotify.destroyPlayer(this);
      super.onDestroy();
  }
  
  @Override
  public void onPlaybackEvent(PlayerEvent playerEvent) {
      Log.d(&quot;MainActivity&quot;, &quot;Playback event received: &quot; + playerEvent.name());
      switch (playerEvent) {
          // Handle event type as necessary
          default:
              break;
      }
  }
  
  @Override
  public void onPlaybackError(Error error) {
      Log.d(&quot;MainActivity&quot;, &quot;Playback error received: &quot; + error.name());
      switch (error) {
          // Handle error type as necessary
          default:
              break;
      }
  }
  
  @Override
  public void onLoggedIn() {
      Log.d(&quot;MainActivity&quot;, &quot;User logged in&quot;);
  
      mPlayer.playUri(null, &quot;spotify:track:2TpxZ7JUBn3uw46aR7qd6V&quot;, 0, 0);
  }
  
  @Override
  public void onLoggedOut() {
      Log.d(&quot;MainActivity&quot;, &quot;User logged out&quot;);
  }
  
  @Override
  public void onLoginFailed(int i) {
      Log.d(&quot;MainActivity&quot;, &quot;Login failed&quot;);
  }
  
  @Override
  public void onTemporaryError() {
      Log.d(&quot;MainActivity&quot;, &quot;Temporary error occurred&quot;);
  }
  
  @Override
  public void onConnectionMessage(String message) {
      Log.d(&quot;MainActivity&quot;, &quot;Received connection message: &quot; + message);
  }
  
  
  }
  </code></pre>
  <p>My build.gradle (Module:app):</p>
  <pre><code>apply plugin: 'com.android.application'
  
  
  android {
  compileSdkVersion 24
  buildToolsVersion &quot;24.0.2&quot;
  defaultConfig {
      applicationId &quot;com.example.mammo.spotifyplayer&quot;
      minSdkVersion 15
      targetSdkVersion 24
      versionCode 1
      versionName &quot;1.0&quot;
      testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  repositories {
  mavenCentral()
  flatDir {
      dirs 'libs'
  }
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',  {
      exclude group: 'com.android.support', module: 'support-annotations'
  })
  // This library handles authentication and authorization
  compile 'com.spotify.sdk:spotify-auth:beta22-noconnect-2.20b@aar'
  
  // This library handles music playback
  compile 'com.spotify.sdk:spotify-player:beta22-noconnect-2.20b@aar'
  compile 'com.android.support:appcompat-v7:24.2.1'
  testCompile 'junit:junit:4.12'
  }
  </code></pre>
  <p>And my AndroidManifest.xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  package=&quot;com.example.mammo.spotifyplayer&quot;&gt;
  &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
  &lt;application
      android:allowBackup=&quot;true&quot;
      android:icon=&quot;@mipmap/ic_launcher&quot;
      android:label=&quot;@string/app_name&quot;
      android:supportsRtl=&quot;true&quot;
      android:theme=&quot;@style/AppTheme&quot;&gt;
      &lt;activity
          android:name=&quot;.MainActivity&quot;
          android:label=&quot;@string/app_name&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
          &lt;/intent-filter&gt;
          
      &lt;/activity&gt;
      &lt;!-- Needed for LoginActivity to work --&gt;
      &lt;activity
          android:name=&quot;com.spotify.sdk.android.authentication.LoginActivity&quot;
          android:theme=&quot;@android:style/Theme.Translucent.NoTitleBar&quot;/&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>