Migrated from Redmine #372 | Author: Donald Wong
Status: Closed | Priority: High, I’m very impatient | Created: 2019-04-08
Hello Team,
I got toekn with URL “https://user-api.simplybook.me/login” first
Json:
{
“jsonrpc”:“2.0”,
“method”:“getToken”,
“params”:[“donaldgmail”,“68618cfdf4221225a9ca42d63a38ba7d0841a2fef5a155b5b35593cc65dbc777”],
“id”:1
}
I got the result of token “0b4873a406f854b6c9f7e876383ddf5374b6f6d57102c7f0724833f4fc4b726a”.
and then, I call API “getBookings” with the URL “https://user-api.simplybook.me/admin”:
Header:
[{“key”:“Content-Type”,“value”:“application/json”},{“key”:“X-Company-Login”,“value”:“donaldgmail”,“description”:“”,“type”:“text”,“enabled”:true},{“key”:“X-Token”,“value”:“0b4873a406f854b6c9f7e876383ddf5374b6f6d57102c7f0724833f4fc4b726a”,“description”:“”,“type”:“text”,“enabled”:true}]
Json:
{
“jsonrpc”:“2.0”,
“method”:“getBookings”,
“params”:[
{“date_from”:“2019-04-29”,
“date_to”:“2019-04-30”,
“booking_type”:“all”,
“event_id”:“5”,
“order”:“start_date”}
],
“id”:5
}
But the result was not as expected that it was not success …
Result Json:
{
“error”: {
“code”: -32600,
“message”: “Access denied”,
“data”: null
},
“id”: “5”,
“jsonrpc”: “2.0”
}
Please help me, thanks a lot !!!