Migrated from Redmine #43 | Author: alok soni Status: Closed | Priority: High, I’m very impatient | Created: 2017-09-07
my login page is
var loginClient = new JSONRpcClient({
‘url’: ‘//user-api.simplybook.me/login’,
‘onerror’: function (error) {
alert(error);
}
});
var token = loginClient.getToken(‘narendra’, ‘5501cb0d7052b9d95ba78559ed41cd65c7bc0d3a51e21e259cbe092142f7537e’);
var loginClient = new JSONRpcClient({
‘url’: ‘//user-api.simplybook.me/login’,
‘onerror’: function (error) {
alert(error);
}
});
var token = loginClient.getToken(‘narendra’, ‘5501cb0d7052b9d95ba78559ed41cd65c7bc0d3a51e21e259cbe092142f7537e’);
var client = new JSONRpcClient({
‘url’: ‘https://user-api.simplybook.me/’,
‘headers’: {
‘X-Company-Login’: ‘narendra’,
‘X-Token’: token
},
‘onerror’: function (error) {
alert(error);
window.location = “login.php”;
}
});
window.location = “Home.php”;
var login = (“”);
var password = (“”);
var services = client.getClientInfoByLoginPassword (login, password);
console.log(services);
Hi! Please just pass client_id and client_sign or client_login and client_password information as clientData.
Do not pass any other client data.
Make sure that you already have this client.
Please just pass client_id and client_sign or client_login and client_password information as clientData.
Do not pass any other client data.
Make sure that you already have this client.
you have any example of login page first login client with email and password no need to send Client sign and Client id then booking page come this page i want to after login Simplybook.me API example and make booking
no, we do not have other examples.
we consider that there is enough documentation for this.
I want to remind you, if you want to integrate booking on your site, we also have special widgets for this
More details: Settings → Booking widget for your own website
Then just login client before using getClientInfo method or getClientInfoByLoginPassword.
The API is not able to save state, so you have to pass client_id, client_hash to book method also.