[#1204] getToken -> "Access denied"

Migrated from Redmine #1204 | Author: Günther Lagler
Status: Feedback | Priority: Normal | Created: 2024-03-21


Hello,

any Idea, why I always get “Access denied” when trying to get the token? (login and API-Key is checked 100 times)

This is what I send: {“jsonrpc”:“2.0”,“method”:“getToken”,“params”:[“aderlasskalender”,“xxx”],“id”:1}
and what I get: {“error”:{“code”:-32600,“message”:“Access denied”,“data”:},“id”:“1”,“jsonrpc”:“2.0”}

Dmytro Bondarev wrote:

Hi,
To investigate your issue please provide full HTTP request including headers and URL.

Günther Lagler wrote:

url is https://user-api.simplybook.it/ (I tried all I could find in docu)
RequestMethod POST
Content-Type: application/json
charset: UTF-8

Rest from the java-src:
conn.setDoInput(true);
conn.setInstanceFollowRedirects(false);
conn.setUseCaches(false);
conn.setReadTimeout(60000);
conn.setConnectTimeout(30000);

Günther Lagler wrote:

with user-api.simplybook.me its the same

Dmytro Bondarev wrote:

Hi, per documentation, to authenticate in API you should use https://user-api.simplybook.it/login, instead of https://user-api.simplybook.it .
API documentation | SimplyBook.me Online Scheduling

(me or it depends on which server your company is)

Günther Lagler wrote:

thanx a lot - works
(I thaught, the example on API documentation | SimplyBook.me Online Scheduling “HTTP Request” area can be used)

Günther Lagler wrote:

When the token expires is a fixed time? THeres no time in the response.

Dmytro Bondarev wrote:

(I thaught, the example on API documentation | SimplyBook.me Online Scheduling “HTTP Request” area can be used)

Yes, example of course can be used.
And first request has /login URL :slight_smile:

When the token expires is a fixed time? THeres no time in the response.

It depends on your system settings, you will receive relevant error.
Usually it is 30 minutes.