title: com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 403
body: <p>I have recently added fabric plugin in my android studio, but i am not finding twitter login option on that plugin. When i search on google then i found one  <a href="https://stackoverflow.com/questions/44350781/how-to-install-twitter-kit-using-fabric-plugin-in-android-studio">question</a> that fabric has recently removed twitter login kit . so i integrate twitterkit using <a href="https://dev.twitter.com/twitterkit/android/overview" rel="nofollow noreferrer">twitter official documentation</a>.
  I integrate twitterkit and implement code according to <a href="https://dev.twitter.com/twitterkit/android/installation" rel="nofollow noreferrer">twitter developer site</a>, but i am facing issue.</p>
  
  <p>This is the Error log:</p>
  
  <pre><code>E/Twitter: Failed to get app auth token
  com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 403
   at com.twitter.sdk.android.core.Callback.onResponse(Callback.java:42)
   at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
   at android.os.Handler.handleCallback(Handler.java:751)
   at android.os.Handler.dispatchMessage(Handler.java:95)
   at android.os.Looper.loop(Looper.java:154)
   at android.app.ActivityThread.main(ActivityThread.java:6209)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
  
  Authorization completed with an error
  com.twitter.sdk.android.core.TwitterAuthException: Authorize failed.
   at com.twitter.sdk.android.core.identity.AuthHandler.handleOnActivityResult(AuthHandler.java:98)
   at com.twitter.sdk.android.core.identity.TwitterAuthClient.onActivityResult(TwitterAuthClient.java:161)
   at com.twitter.sdk.android.core.identity.TwitterLoginButton.onActivityResult(TwitterLoginButton.java:131)
   at in.crazyfingers.cyny.social_login.ActivitySocialSignIn.onActivityResult(ActivitySocialSignIn.java:305)
   at android.app.Activity.dispatchActivityResult(Activity.java:7007)
   at android.app.ActivityThread.deliverResults(ActivityThread.java:4173)
   at android.app.ActivityThread.handleSendResult(ActivityThread.java:4220)
   at android.app.ActivityThread.-wrap20(ActivityThread.java)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1559)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:154)
   at android.app.ActivityThread.main(ActivityThread.java:6209)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
  </code></pre>
  
  <p>I have checked <a href="https://stackoverflow.com/questions/42832290/failed-to-get-app-auth-token-twitterapiexception-http-request-failed-status-4">Question 1</a> and <a href="https://twittercommunity.com/t/twitter-failed-to-get-app-auth-token-com-twitter-sdk-android-core-twitterapiexception-http-request-failed-status-403/72544/3" rel="nofollow noreferrer">Question 2</a> and other so many question which is related to this issue but its not worked for me. Help would be appreciate. Thanks in advance.</p>
  
  <p>This is my app level <strong>build.gradle</strong> file</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.2"
      defaultConfig {
          applicationId "com.twitter"
          minSdkVersion 15
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  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'
      })
      compile 'com.android.support:appcompat-v7:25.3.1'
      testCompile 'junit:junit:4.12'
  
      // Include all the Twitter APIs
      compile 'com.twitter.sdk.android:twitter:3.0.0'
  
  }
  </code></pre>
  
  <p>This is my <strong>CustomApplication.Java</strong> file.</p>
  
  <pre><code>public class CustomApplication extends Application
  {
      public void onCreate() {
          Twitter.initialize(this);
      }
  }
  </code></pre>
  
  <p>This is my <strong>TwitterLogin.java</strong> file</p>
  
  <pre><code>public class TwitterLogin extends AppCompatActivity
  {
      public static final String TAG = "[TwitterLogin]";
  
      private String TWITTER_KEY = "here my app twitter key";
      private String TWITTER_SECRET = "here my app secret key";
  
      private TwitterLoginButton loginButton;
      private TextView status;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.activity_twitter_login);
  
          TwitterConfig config = new TwitterConfig.Builder(this)
                  .logger(new DefaultLogger(Log.DEBUG))
                  .twitterAuthConfig(new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET))
                  .debug(true)
                  .build();
          Twitter.initialize(config);
  
          loginButton = (TwitterLoginButton) findViewById(R.id.twitter_login_button);
          loginButton.setCallback(new LoginHandler());
      }
  
      private class LoginHandler extends Callback&lt;TwitterSession&gt; {
          @Override
          public void success(Result&lt;TwitterSession&gt; twitterSessionResult) {
  
              String output = "Status: " +
                          "Your login was successful " +
                          twitterSessionResult.data.getUserName() +
                          "nAuth Token Received: " +
                          twitterSessionResult.data.getAuthToken().token;
  
              Log.e(TAG, "twitterSessionResult : " + output);      
          }
          @Override
          public void failure(TwitterException e) {
              status.setText("Status: Login Failed");
          }
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          // Pass the activity result to the login button.
          loginButton.onActivityResult(requestCode, resultCode, data);
      }
  }
  </code></pre>