[#592] Where $clientId, user time offset

Migrated from Redmine #592 | Author: Stas K
Status: New | Priority: High, I’m very impatient | Created: 2020-10-15


Prompt: in the admin part of the api description there is a book method (API documentation | SimplyBook.me Online Scheduling). Where can I get the $clientId parameter, because if I take a random number, then I get an incorrect email in the booking description.

And one more thing: is it possible to transfer the client time offset when creating a booking via standard (non-admin) methods? That would be the time in the letter for the client, taking into account his time zone.

Redmine Admin wrote:

you can pass $clientTimeOffset into this method

Stas K wrote:

How can I get the clientId value from your database to put it in the admin book method. If I do not put it, then a new client is created and I want the reservation to be added to your existing user, and only if it does not exist then a new one is created.

Redmine Admin wrote:

Stas K wrote:

https://i.imgur.com/D1PHh1K.png

When I try to get a list of users, it gives me Access Denied. Although I use the token that I get from the getUserToken method specifically for the administrative part. Tell me why access can be prohibited?

Redmine Admin wrote:

make sure to use admin api for this and not viewer user

Stas K wrote:

Thanks, I figured it out myself, you need to specify the X-User-Token and not the X-Token for admin requests, although this moment is not spelled out in the documentation.