5

I am using QuickBlox SDK to load chat history. Like this:

  1. Create Session
  2. after successfully creating section Initialize chatService
  3. Login chat Service
  4. After successful Login.

Bundle bundle = new Bundle();
QBRequestGetBuilder customObjectRequestBuilder = new QBRequestGetBuilder();
customObjectRequestBuilder.setPagesLimit(ConstsCore.CHATS_DIALOGS_PER_PAGE);
try
{
    List<QBDialog> chatDialogsList = QBChatService.getChatDialogs(null, customObjectRequestBuilder,bundle);
} catch (QBResponseException e)
{
    e.printStackTrace();
}

At this step I am getting this Exception:

base Forbidden. Need user.

Termininja
  • 6,620
  • 12
  • 48
  • 49
Apurva Kolapkar
  • 1,270
  • 2
  • 16
  • 32
  • Did you check http://stackoverflow.com/questions/25968544/errorsbaseforbidden-need-user ? –  Apr 08 '16 at 12:13

1 Answers1

0

Chat it's a real time protocol

but chat dialogs retrieval is a REST API, so you have to login via REST API as well to use REST API requests

http://quickblox.com/developers/SimpleSample-users-android#Sign_In_with_login_.26_password

Rubycon
  • 18,156
  • 10
  • 49
  • 70