3

I try to use the quickblox chat in my ionic App but something wrong, I create a quickblox account then i create a QBsession:

QB.init(appId,'Authpublic','AuthPrivate');

// create an API session (user is not authenticated)
QB.createSession(function(err, result) {
    if (err) { 
        console.log('Something went wrong: ' + err.message + ' ' + err.detail);
    } else {
        console.log('Session created with id ' + result.id);
    }
});   

but console tell me this:

setting headers on request to <https://api.quickblox.com/session.json quickblox.min.js:2>
setting headers on request to <https://api.quickblox.com/users.json quickblox.min.js:2>
Failed to load resource: the server responded with a status of 422 (Unprocessable Entity)          <https://api.quickblox.com/session.json>
Something went wrong: Unprocessable Entity {"errors":{"base":["Bad timestamp"]}}      controllers.js:233
Failed to load resource: the server responded with a status of 401 (Unauthorized) 

I tried to use this app also: https://github.com/QuickBlox/sample-chat-xmpp-phonegap but it doesn't work so I tried to put my quickblox credential and doesn't work again. I change the config.xml file too with my id app, Auth public and Auth private credential but it doesn't work. someone has an idea??thanks!

user3706153
  • 191
  • 2
  • 8

0 Answers0