[#42] Getting [-32068] Client authorization required

Migrated from Redmine #42 | Author: alok soni
Status: Closed | Priority: Immediate, there is BUG! | Created: 2017-09-05


Getting [-32068] Client authorization required in my home page

home page url

http://dev.dissertationconsulting.co.uk/bookingsystem/home.php

client details =

name Frances T. Perez

email FrancesTPerez@teleworm.us

phone +1502-810-4521

why i am getting this error

Redmine Admin wrote:

API is correct because you enabled client login plugin.

alok soni wrote:

how to solve this issue sir

Vitaliy Kordiak wrote:

There are 2 variations:

  1. Disable “client login”
  2. Integrate support “client login” in your script

alok soni wrote:

ok sir i will try :slight_smile:

alok soni wrote:

alok soni wrote:

Getting [-32068] Client authorization required in my home page

home page url

http://dev.dissertationconsulting.co.uk/bookingsystem/home.php

client details =

why i am getting this error

alok soni wrote:

alok soni wrote:

Getting [-32068] Client authorization required in my home page

home page url

http://dev.dissertationconsulting.co.uk/bookingsystem/home.php

client details =

name Frances T. Perez

why i am getting this error

Vitaliy Kordiak wrote:

Redmine Admin wrote:

API is correct because you enabled client login plugin.

alok soni wrote:

please suggest me how to

Integrate support “client login” in scheduler.js for removing this error

[-32068] Client authorization required

Dmytro Bondarev wrote:

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.

alok soni wrote:

how to find client id and client sign

Dmytro Bondarev wrote:

Client sign is md5($clientId . $clientHash . $secretKey)
Client id you are getting when you are reating new client.

Please make sure that you need this feature.

Vitaliy Kordiak wrote:

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

Example widget code:


            

alok soni wrote:

actuly sir i am integrate this with custom code you can see here

https://www.workjoyprogram.com/booking/login.php

user email hiteshgupta2016@gmail.com

pass= i4c4444

when i am login booking page is open just see this and give me some help regarding conforming booking

Dmytro Bondarev wrote:

Please clarify the question.
I see just empty page, so i do not know how to help you.

alok soni wrote:

https://www.workjoyprogram.com/booking/login.php

please login there after that make a booking

Dmytro Bondarev wrote:

I do not see that you pass client_login or client_id to authenticate client.
If you do not need client login feature please just turn it off and this code will work for you.
If you need this feature then please create client get client_id and client_hash and pass required information for client login (see above).

alok soni wrote:

can you give me suggestion about my login page..?

my code 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 = (“<?php echo $_POST['username']; ?>”);
var password = (“<?php echo $_POST['pass']; ?>”);

var services = client.getClientInfoByLoginPassword (login, password);
console.log(services);

here is how can input client id and client hash for making booking and see my old booking

please suggest me ..

Vitaliy Kordiak wrote:

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.