Migrated from Redmine #937 | Author: Kristian Selnæs
Status: Feedback | Priority: High, I’m very impatient | Created: 2022-09-29
I’m trying to make a new booking through the REST API with an admin user account. All other requests with this user/token work, but booking returns a 401. Any ideas why?
Here is my raw query and corresponding response (company name and token are masked):
POST https://user-api-v2.simplybook.me/admin/bookings
401
598 ms
POST /admin/bookings HTTP/1.1
Content-Type: application/json
X-Compay-Login: ***test
X-Token: af310a369------***
User-Agent: PostmanRuntime/7.29.2
Accept: */*
Cache-Control: no-cache
Postman-Token: 596e50c6-e9ec-4e30-be30-0f5095e47740
Host: user-api-v2.simplybook.me
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 148
{
"count": 1,
"start_datetime": "2022-09-30 10:00:00",
"location_id": 1,
"service_id": 1,
"provider_id": 1,
"client_id": 1
}
HTTP/1.1 401 Unauthorized
Server: nginx
Date: Thu, 29 Sep 2022 11:26:34 GMT
Content-Type: application/json
Content-Length: 65
Keep-Alive: timeout=20
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, PUT, DELETE, GET, OPTIONS
Access-Control-Allow-Headers: content-type, x-company-login, x-token, x-requested-with
X-IPLB-Request-ID: C1D6EE66:EAF4_8E2C8CB0:01BB_633580EA_23767A8:07F9
Strict-Transport-Security: max-age=15768000
X-IPLB-Instance: 45487
{"code":401,"message":"Unauthorized","data":[],"message_data":[]}