I'm trying to create from the mobile app an API Session with user authorization (in the same call) on QuickBlox using this ajax call.
var url = 'https://api.quickblox.com/session.json';
var data = 'application_id=' + QB.appId + '&auth_key=' + QB.authKey + '×tamp=' + s.timestamp + '&nonce=' + s.nonce + '&signature=' + s.signature + '&user[login]=' + username + '&user[password]=' + password;
$.ajax({
type: 'POST',
url: url,
data: data,
success: successCallback,
error: errorCallback
});
Note that username and password are replaced with text strings that correspond to a real user on QuickBlox's app.
Quickblox returns this error :
{
"readyState":4,
"responseText":" {
"errors":{
"base":["Unexpected signature"]
}
}",
"status":422,
"statusText":"Unprocessable Entity"
}
But if I create from the mobile app the same API Session WITHOUT user authorization on QuickBlox using this data string (the same without user and pass).
var data = 'application_id=' + QB.appId + '&auth_key=' + QB.authKey + '×tamp=' + s.timestamp + '&nonce=' + s.nonce + '&signature=' + s.signature;
QuickBlox creates the session correctly. Can someone tell me where is the mistake?.
Thank you in advanced. ;-)