Error 401 android rest api



I got the successful login, and get basic detail and also tweet list, but Getting 401 error , while getting the follower list in Android using rest Api , its saying 401 error.


Can you be more specific? Are you using Twitter Kit for Android? Can you share any code and explain the point at which you are seeing the 401 error?


yes , i am using twitter android kit

here is the twitter authentication code, that we got success nad after success i am calling initFollower() method

 login_button.setCallback(new Callback<TwitterSession>() {
            public void success(Result<TwitterSession> result) {
                TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();
                TwitterAuthToken authToken = session.getAuthToken();

           ` **initFollower(,;**`

            public void failure(TwitterException exception) {

void initFollower(long id,TwitterSession session) {
        MyTwitterApiClient client=new MyTwitterApiClient(session);
        CustomService service=client.getCustomService();
        data.enqueue(new Callback<List<User>>() {
            public void success(Result<List<User>> result) {


            public void failure(TwitterException exception) {




here is custom class

public class MyTwitterApiClient extends TwitterApiClient {

    public MyTwitterApiClient(TwitterSession session) {

    public CustomService getCustomService() {
        return getService(CustomService.class);

here is interface

public interface CustomService {
    Call<List<User>> show(@Query("user_id") Long userId,
                          @Query("screen_name") String screenName,
                          @Query("cursor") String cursor,
                          @Query("count") String count,
                          @Query("skip_status") boolean skip_status,
                          @Query("include_user_entities") Boolean include_user_entities);


Can you please provide quick solution , because its urgent please


(moved to the Twitter Kit category for additional attention / investigation)

Unfortunately we’re not able to commit to specific timeframes to address individual questions, but someone will try to take a look when they have time. Thanks.