system
December 3, 2024, 9:31am
1
Migrated from Redmine #1325 | Author: soniya james
Status: Feedback | Priority: High, I’m very impatient | Created: 2024-12-03
New booking getting
{
“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}
This error how i can fix this
system
December 3, 2024, 9:36am
2
Dmytro Bondarev wrote:
Hi,
If you use client login custom feature, you should pass client_id and client_sign to $clientData parameter.
Where
client_id - is client id
client_sign - is md5(clientId + clientHash + secretKey) ,
clientHash - you will receive when client is created.
secretKey - your secret key
system
December 3, 2024, 9:50am
3
soniya james wrote:
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [
“1”, // User ID (or entity ID)
“2”, // Service ID (or service identifier)
“2024-12-04”, // Booking Date (YYYY-MM-DD)
“09:00:00”, // Booking Time (HH:mm:ss)
{
“name”: “rinu”, // Client’s name
“email”: “rinu62@gmail.com ”,// Client’s email
“phone”: “9488567900” // Client’s phone number
},
{}, // Additional parameters (empty object here)
1 // Integer (could represent confirmation or a status code)
],
“id”: 1
}
this will not work?
“name”: “rinu”, // Client’s name
“email”: “rinu62@gmail.com ”,// Client’s email
“phone”: “9488567900”
we need to pass like this?
client_id - is client id
client_sign - is md5(clientId + clientHash + secretKey) ,
clientHash - you will receive when client is created.
secretKey - your secret key
system
December 3, 2024, 11:17am
4
Dmytro Bondarev wrote:
If you are using client login, then it will not work, please use client_id, client_sign as described above.
system
December 3, 2024, 11:54am
5
soniya james wrote:
hello sir,
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: {
“eventId”:6,
“unitId”: 2,
“date”: “2024-12-04”,
“time”: “14:00:00”,
“clientData”: [“6”,
“cfcd208495d565ef66e7dff9f98764da”],
“additional”: ,
“count”: 1,
“batchId”: null,
“recurringData”: {
“recurrenceType”: “weekly”,
“duration”: 10
}
},
“id”: 1
}
if i am passing client_id, client_sign as described above.
now also getting
{
“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}
Give a proper solution
system
December 3, 2024, 12:16pm
6
Dmytro Bondarev wrote:
As we explained already, you should not use named parameters.
Your request should look like:
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: {
6, 2, “2024-12-04”, “14:00:00”, {“client_id”: 6, “client_sign”: “cfcd208495d565ef66e7dff9f98764da”}, {}, 1, null, {
“recurrenceType”: “weekly”,
“duration”: 10
}
},
“id”: 1
}
system
December 3, 2024, 12:23pm
7
soniya james wrote:
Then also same issue.
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [“6”,“2”,“2024-12-04”, “14:00:00”, [“6”, “cfcd208495d565ef66e7dff9f98764da”], {}, 1, null, {
“recurrenceType”: “weekly”,
“duration”: 10
}
],
“id”: 1
}
{
“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}
system
December 3, 2024, 12:24pm
8
Dmytro Bondarev wrote:
Please provide full http request and response.
system
December 3, 2024, 12:25pm
9
soniya james wrote:
https://user-api.simplybook.me/
X-Company-Login:airportvipservice
X-Token:39f47c1d7ab479b3fc34f89cf3a162dc2a2d81fbccf1d61df1089c0fbba7f78b
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [6,2,“2024-12-04”, “14:00:00”, [“6”, “cfcd208495d565ef66e7dff9f98764da”], {}, 1, null, {
“recurrenceType”: “weekly”,
“duration”: 10
}
],
“id”: 1
}
{
“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}
system
December 3, 2024, 12:32pm
10
Dmytro Bondarev wrote:
Including endpoint and method.
system
December 3, 2024, 12:34pm
11
soniya james wrote:
method POST
end point https://user-api.simplybook.me/
Header
X-Company-Login:airportvipservice
X-Token:39f47c1d7ab479b3fc34f89cf3a162dc2a2d81fbccf1d61df1089c0fbba7f78b
Request
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [6,2,“2024-12-04”, “14:00:00”, [“6”, “cfcd208495d565ef66e7dff9f98764da”], {}, 1, null, {
“recurrenceType”: “weekly”,
“duration”: 10
}
],
“id”: 1
}
Response
{
“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}
system
December 3, 2024, 12:43pm
12
Dmytro Bondarev wrote:
Please check your parameters:
In example i provided oobject with client_id, client_sign, you pass array in this parameter.
6, 2, “2024-12-04”, “14:00:00”, {“client_id”: 6, “client_sign”: “cfcd208495d565ef66e7dff9f98764da”}, {}, 1, null, {
system
December 3, 2024, 12:50pm
13
soniya james wrote:
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”:[
“6”, “2”, “2024-12-04”, “14:00:00”, {“client_id”: 6, “client_sign”: “cfcd208495d565ef66e7dff9f98764da”}, {}, 1, null, {
“recurrenceType”: “weekly”,
“duration”: 10
}
],
“id”: 1
}
{
“error”: {
“code”: -32085,
“message”: “Signature error”,
“data”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}
If i am giving your example 500 error getting
system
December 3, 2024, 12:53pm
14
Dmytro Bondarev wrote:
Signature error is not 500n error.
it means that you generated client_sign in a wrong way. Please make sure that you generate it correctly.
system
December 3, 2024, 3:50pm
15
soniya james wrote:
I tried with different Ids then also same issue.
system
December 3, 2024, 3:54pm
16
Dmytro Bondarev wrote:
Just try with correct id, correct client_hash, and correct secret key.
Please provide client id, client_hash and your result of client_sign.
system
December 3, 2024, 4:01pm
17
soniya james wrote:
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: {
“eventId”: 6,
“unitId”: 2,
“date”: “2024-12-04”,
“time”: “14:00:00”,
“clientData”: {“client_login":"FrancesTPerez@gmail.com ”, “client_password” :“ValidPassword123”},
“additional”: {},
“count”: 1,
“batchId”: null,
“recurringData”: {
“recurrenceType”: “weekly”,
“duration”: 10
}
},
“id”: 1
}
this way I given its working now