Knowledgebase: General
I receive “Token is required” error?
Posted by on 31 January 2014 09:57 AM

I receive “Token is required” error, why?


The error means that you are trying to perform a query without creating a session first.

To create session use the following:

QBAuth.createSession(new QBCallbackImpl() {
            public void onComplete(Result result) {
                if (result.isSuccess()) {
                    // do other requests here
                } else {


You can also try checking your token for null:

try {
    String token = BaseService.getBaseService().getToken();
    if(token == null){
        // recreate session here
} catch (BaseServiceException e) {


If for some reason it is null, recreate the session.



(14 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name: