Failed To get auth Token

android
fabric
oauth

#1

I’m trying to integrate twitter in my android application using twitter fabric. Keys are generated by fabric. Followed every process and metthod given on google, fabric docs and twitter community but stillis not able to solve it. I’m testing my application on real device with twitter application installed in it. When I press login twitter button I get errors :

`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:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

03-23 17:48:26.928 17049-17049/com.digilocker.android E/Twitter: 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 com.digilocker.android.ui.activity.SocialMedia.onActivityResult(SocialMedia.java:257)
at android.app.Activity.dispatchActivityResult(Activity.java:6218)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3655)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3702)
at android.app.ActivityThread.access$1300(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)`

help me with this. I’m struggling since last 3 weeks.


#2

“Failed to get app auth token” usually indicates the Twitter consumer key or secret is invalid. Can you share your consumer key so we can look into the issue? Also what version of the TwitterApp are you running.