[#1205] Help doing the first steps

Migrated from Redmine #1205 | Author: Günther Lagler
Status: New | Priority: Normal | Created: 2024-03-27


I get the token, but no next step is working. I thaught, getting the bookinglist would be a good start.
Trying this (with method GET from docu):
url: https://user-api.simplybook.it/admin/bookings
conn: {X-Token=[b02c945b2258a96c49c40323a29909a98cc5c36ed0fe4ce370b60a6f1e95ecd7], X-Company-Login=[aderlasskalender], Content-Type=[application/json]}

It returns this (looks like a description for wrong calls):
{“transport”:“POST”,“envelope”:“JSON-RPC-2.0”,“contentType”:“application/json”,“SMDVersion”:“2.0”,“target”:“/admin/bookings”,“services”:{“getBookings”:{“envelope”:“JSON-RPC-2.0”,“transport”:“POST”, …

Using method POST, it returns:
{“error”:{“code”:-32600,“message”:“Access denied”,“data”:},“id”:null}

So first, is GET (like in the docu) or POST (like in the answer) used, and why access denied with a valid company-login and token?

Some working examples for java would be nice …

best regards

Redmine Admin wrote:

hi, you can put your login and key here and play with API explorer API documentation | SimplyBook.me Online Scheduling

Günther Lagler wrote:

thank you :slight_smile:

(Short original content)

Günther Lagler wrote:

The example-code works fine, but what is the way to receive all or only new bookings?
I created a test-meeting, but didnt get it with getEventList.
Can you give me the http request for getting bookings?

Günther Lagler wrote:

getBookings from doku returns
{“error”:{“code”:-32601,“message”:“Method not found”,“data”:null},“id”:“1”,“jsonrpc”:“2.0”}

Günther Lagler wrote:

on https://user-api.simplybook.it/admin getBookings returns
{“error”:{“code”:-32600,“message”:“Access denied”,“data”:},“id”:“1”,“jsonrpc”:“2.0”}

Redmine Admin wrote:

hi, to get bookings you need to use admin API not public API which you are trying to use API documentation | SimplyBook.me Online Scheduling

Günther Lagler wrote:

can you give me the admin api??
(As I wrote, “https://user-api.simplybook.it/admin” returns “Access denied”)

Günther Lagler wrote:

or can you give me an example like this for getBookings?:

POST https: HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 60
X-Company-Login: aderlasskalender
X-Token: 40120c4ad6d931409363614df9bce180dbaaa3e8b8765fe506f5d6c22ada1418
Accept: application/json

Redmine Admin wrote:

X-Token must be X-User-Token for admin

Günther Lagler wrote:

Send: {“jsonrpc”:“2.0”,“method”:“getUserToken”,“params”:[“aderlasskalender”,“hoenegger.g@hildegard.at”,“simplybook963hvb!”],“id”:1}
Token: 28b13b92ee221a1e2b5a84d1f9fd63d7de583b534fc5cbd946f4c3e378e53c6b
url: https://user-api.simplybook.it/admin
send(“POST”, “{"jsonrpc":"2.0","method":"getBookings","params":,"id":1}”)
conn.setRequestProperty(“Content-Type”, “application/json”);
conn.setRequestProperty(“Accept”, “application/json”);
conn.setRequestProperty(“X-Company-Login”, companyLogin);
conn.setRequestProperty(“X-Token”, access_token);
Result: {“error”:{“code”:-32600,“message”:“Access denied”,“data”:},“id”:“1”,“jsonrpc”:“2.0”}

something else getBookings needs?