[#503] Client authorization required when Booking

Migrated from Redmine #503 | Author: Renaldas Cypas
Status: New | Priority: High, I’m very impatient | Created: 2020-03-31


I’m calling Company Public service, and want to add Guest booking, but getting error: Client authorization required

data below:

X-Token: 3ea5004475c80db065315fd66fd69cb3cd3b43ab89348d7c9dbbad410d2b87f1
X-Company-Login: servicestore

Request:
{“jsonrpc”: “2.0”,“method”:“book”,“params”:[9,“14”,“2020-03-31”,“13:00”,{“name":“ta”,“phone”:“123”,“email”:"someemail@gmail.com”,“address1”:“someaddr”,“address2”:“”,“city”:“ta”,“zip”:“12333”,“password”:null},{“4379752337c12115e8a573be171952ac”:“Assemble flat pack furniture 1 x Bedside tables, dinning chair (SMALL) - £10.5 (31 Mar 2020 01:00 PM) \n\nFurniture type: null\nDo you have the instruction manuals?: null\nDoes item need fixing to wall/floor?: null\nAre there any obstructions, cables etc?: null\nPlease provide details/comments: null\nWhat type of wall is the item being fixed on?: null\nI agree to provide enough screws and rawl plugs for fixing the items to the wall: null\n\n\n\n”},0,1],“id”:1}

Response:
{
“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}

Dmytro Bondarev wrote:

In case you use “Client login” custom feature you should pass @client_id@ and @client_sign@ or @client_login@ and @client_password@ parameters in client data of existing client.
The @client_sign@ is @md5(clientId + cllientHash + yourSecretKey)@.

Renaldas Cypas wrote:

Dmitry Bondarev wrote:

In case you use “Client login” custom feature you should pass @client_id@ and @client_sign@ or @client_login@ and @client_password@ parameters in client data of existing client.
The @client_sign@ is @md5(clientId + cllientHash + yourSecretKey)@.

Can I use both solutions, where customers can register or they can book as guest users?

Redmine Admin wrote:

hi, no, this is not possible

Dmytro Bondarev wrote:

You can make client for each guest and use them.