Migrated from Redmine #80 | Author: Miodrag Dragic Status: Feedback | Priority: Normal | Created: 2017-12-22
I try to get booking details, but I get error Signature error.
The code was written in PHP.
$booking[‘Booking’][‘id’] = 9
$booking[‘Booking’][‘hash’] = f7f82eabde3a1d02c1ad305045026bc8
$YOUR_API_SECRET_KEY = ‘XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX171470’;
$sign = md5($booking[‘Booking’][‘id’] . $booking[‘Booking’][‘hash’] . $YOUR_API_SECRET_KEY);
Please provide full http request.
It looks like you are passing wrong parameters.
See: $request = $this->Client->createJsonRequest(‘getBookingDetails’, [‘isVisibleOnly’ => true, ‘asArray’ => true, ‘handleClasses’ => 1]);
it should be id and sign, not named parameters.
I am sending in second row
$request, [‘host’ => ‘user-api.simplybook.me’], [‘id’ => $booking[‘Booking’][‘id’],‘sign’=>$sign], [“X-Token” => $token, “X-Company-Login” => “jojonails”]);
It is hard to understand what happens without HTTP request, because i do not know how your code works inside.
But again it looks like you are passing named parameters or object to API, instead of pass plain parameters.