David Saenz wrote:
Redmine Admin wrote:
Yes, it is possible.
- You need to enable Client Login plugin to prevent bookings without auth
- Find client by email Company administration service methods - Company administration service methods - SimplyBook.me
- get bookings for this client Company administration service methods - Company administration service methods - SimplyBook.me
Hi,
I activate plugin and I create new client with addClient method.
But now, when I call ->book method, I receive this response:
“Client authorization required”
This is the raw request
General
Request URL: https://user-api.simplybook.me/
Request Method: POST
Status Code: 200
Remote Address: 158.69.26.11:443
Referrer Policy: no-referrer-when-downgrade
Response headers
access-control-allow-headers: content-type, x-company-login, x-application-token, x-user-token, x-token, x-requested-with
access-control-allow-methods: POST, GET, OPTIONS
access-control-allow-origin: *
content-length: 102
content-type: application/json; charset=UTF-8
date: Tue, 23 Oct 2018 10:50:14 GMT
server: nginx
status: 200
x-xss-protection: 1; mode=block
Provisional headers are shown
Request headers
Accept: application/json, text/javascript, /; q=0.01
Content-Type: application/json
Origin: http://dev.etronroom:3000
Referer: http://dev.etronroom:3000/booking
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
X-Company-Login: audietrontest
X-Token: 3dc24e53d35551a8497e28c5e4256f173d0358f1e59268aceb157413c49d8630
Request payload
{jsonrpc: “2.0”, method: “book”, params: [1, 1, “2018-10-24”, “09:00:00”,…], id: 4}
id: 4
jsonrpc: “2.0”
method: “book”
params: [1, 1, “2018-10-24”, “09:00:00”,…]
0: 1
1: 1
2: “2018-10-24”
3: “09:00:00”
4: {name: “Sr. David Saenz”, email: “david@herokidstudio.es”, phone: “654654654”}
email: "david@herokidstudio.es"
name: "Sr. David Saenz"
phone: "654654654"
5: {59953ee728fc870866f831637b795eef: “38138131B”, 5c242c304e2311cf409c104e235c00ec: “2”}
5c242c304e2311cf409c104e235c00ec: "2"
59953ee728fc870866f831637b795eef: "38138131B"
This is the response
{"error":{"code":-32068,"message":"Client authorization required","data":[]},"id":"4","jsonrpc":"2.0"}
Do you know how to solve this?
Thanks in advance.
David.