6

I am using Fabric digits to verify user for my app. I have done everything as told in Description but when verifying user i get

HTTP Error: 401 Authorization Required, API Error: 32, User Message: Try Again

Here is my code please help

phoneButton = (DigitsAuthButton) findViewById(R.id.auth_button);
    phoneButton.setAuthTheme(R.style.AppTheme);
    phoneButton.setCallback(new AuthCallback() {
        @Override
        public void success(DigitsSession digitsSession, String phoneNumber) {

        }

        @Override
        public void failure(DigitsException e) {

        }
    });

This error i don't know what i am doing wrong pleas help i have been stuck on this for more than 2 days.

Please help.

I tested this on several devices with different network operator. It works on only one. Can anyone tell me how to solve this.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Android
  • 1,085
  • 4
  • 13
  • 28

1 Answers1

0

Try doing this Add this line of code under your OnCreate method.

Digits.clearActiveSession();
TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
Digits.Builder digitsBuilder = new Digits.Builder().withTheme(R.style.CustomDigitsTheme);
  • 1
    When ever you post any code, please make sure that you have applied the appropriate formatting. You may read more here http://meta.stackoverflow.com/questions/251361/how-do-i-format-my-code-blocks – Sibeesh Venu Dec 01 '16 at 09:13