[#216] Booking confirm - Booking hash

Migrated from Redmine #216 | Author: Alejandro Mataloni
Status: New | Priority: Normal | Created: 2018-08-13


Hello I am trying to use the confirmBooking method through the api, but I am having some troubles:

  1. Where I am suppose to get the bookingHash (I am storing it from the webhook callback, but I wanted to know if I can get calling the api)
  2. Using that hash and doing the md5 I am getting the Signature error. Is “34.d3a9ad07e1c7f7611a3f99ae8ebda1d9.939a6c807c2feafaf9d413976d80c21461e3a03db2d122181b85448f93b10f91” a valid input for the sign param?

Redmine Admin wrote:

Please check manual here Company public service methods - Company public service methods - SimplyBook.me

There is no API function to get hash for security reasons. You can use administrative API and confirm bookings without a hash

Alejandro Mataloni wrote:

Redmine Admin wrote:

Please check manual here Company public service methods - Company public service methods - SimplyBook.me

There is no API function to get hash for security reasons. You can use administrative API and confirm bookings without a hash

I looked in the administrative API but I did not find how to do that.

Redmine Admin wrote:

you are right. Bookings made by admin API are always confirmed. You need to store bookingHash and then use it to call confirmBooking via public API
signature is calucaleted by the formula md5($bookingId . $bookingHash . $secretKey)

34.d3a9ad07e1c7f7611a3f99ae8ebda1d9.939a6c807c2feafaf9d413976d80c21461e3a03db2d122181b85448f93b10f91 – this string does not looks like md5 hash