[#1502] Subject: Persistent Authorization Failure for 'book' Method (Wrong API Key / Client Authorization Required Cycle)

Migrated from Redmine #1502 | Author: Jo Achim
Status: Rejected | Priority: High, I’m very impatient | Created: 2025-12-03


I am developing an integration to create bookings using the SimplyBook.me Customer API (user-api.simplybook.me) and the book JSON-RPC method.
I am facing a critical authorization failure that cycles between two specific errors, preventing us from testing the booking process.

  1. “Client authorization required (during the book call)”
  2. “Token Error: Wrong API key (during the getToken call)”

book Method Authorization: Which type of token (Client Token via getToken or Admin Token via getUserToken or Secret Key via getToken) is specifically required to successfully execute the book method on the Customer API?

Redmine Admin wrote:

hi, did you enable client login custom feature just before you start to getting this? - if yes then you need to authorize the client for booking, if not please provide your raw http request

Jo Achim wrote:

Subject: Urgent API Booking Issue: Persistent “Client email value is wrong” Error despite extensive testing

Dear Support Team,

I have been working to integrate the SimplyBook.me JSON-RPC API and have successfully isolated the issue to a persistent validation error in the client data fields.

Current Configuration Status:
Client Login Feature: Deactivated. The public API key is successfully fetching a client token.

Booking Parameters: The code currently sends the client’s name, email, and phone number as standard fields (not via the custom block), as all other combinations failed.

Error Received: Despite using the standard fields, the API consistently returns the error: Booking Error: Client email value is wrong (German original: Buchungsfehler: Client email value is wrong).

Last Failed Request Structure:
This is the exact JSON structure sent in the last request that failed with the email error:

JSON

{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: {
“serviceId”: 2,
“staffId”: 2,
“startTime”: “2026-06-01 11:30:00”,
“name”: “Max Mustermann”,
“email”: “max.mustermann.test@web.de”,
“phone”: “+49123456789”,
“custom”: {}
},
“id”: 5
}
Urgent Request for Account-Specific Validation Rules:
Since we have exhausted all logical parameter combinations, the issue must be related to an internal, account-specific validation rule.

Could you please check my account’s internal API validation settings and clarify the following:

Exact Field Names/Structure: Which precise field name structure does the book method expect for Client Name, Email, and Phone Number in my specific account configuration (e.g., name and email as standard fields, or are they mandatory Custom Fields with specific IDs)?

Email Validation: If the email must be sent via a standard field, why is the email field being rejected? (Is it a specific format requirement, or is the system internally expecting the email value to be sent via a Custom Field ID, even if Custom Fields are technically optional?)

Please provide the exact required JSON structure for the params object expected for a guest booking in our system.

Thank you very much for your support.

Redmine Admin wrote:

please make your request according to the documentation API documentation | SimplyBook.me Online Scheduling

There is no staffId parameter which is used in your code. If you are using AI please manually check its code

Jo Achim wrote:

Subject: URGENT: Persistent “Client name value is wrong” Error with correct ‘client’ object structure (My Account Validation Issue)

Dear Support Team,
I am writing to follow up on our previous correspondence. Despite following your guidance to use the client object for standard customer fields, the booking API continues to fail with a name validation error.

We have exhausted all logical combinations and have confirmed that the issue is not with the code, but with the internal validation rules specific to my account.

Error and Structure Conflict

Error Received: Booking Error: Client name value is wrong
Failed Structure Sent: We are currently sending the name split into first_name and last_name within the client object, which is the final logical standard API structure.
This is the exact JSON structure sent in the last failed request (which produced the ‘Client name value is wrong’ error):

JSON

{
“serviceId”: 2,
“startTime”: “2026-06-01 12:00:00”,
“client”: {
“first_name”: “Max”,
“last_name”: “Mustermann”,
“email”: “max.mustermann.final@web.de”,
“phone”: “+49123456789”
},
“custom”: {}
}

Final Request for Internal Validation Check
Since we have confirmed that the token works, the time slot is valid, and the data structure uses the correct client object (even splitting the name), we are requesting an urgent internal validation check on the server side for my account.

Please check and confirm:

Which specific field names (e.g., name, client_name, first_name, last_name) does the API MANDATORILY expect for the client name fields?
Is there a hidden Custom Field ID that is conflicting with the standard field definition for the name in my account, causing this repeated validation failure?
Please provide the single, definitive JSON structure that will pass validation for a guest booking in our account.

Thank you for your prompt attention to this unique issue.

Redmine Admin wrote:

hi, this AI generated text has no much sense. Unfortunately we cannot help you with AI generated contect

Jo Achim wrote:

I have sent you pure technical error logs and the exact data structures that your API is rejecting.

I need a simple, clear answer to a technical problem.

Problem: We are sending the correct booking structure, but your API is rejecting the name.

Redmine Admin wrote:

the structure you sent is not correct, mandatory unitId parameter is missed.

JSON

{
"serviceId": 2,
"startTime": "2026-06-01 12:00:00",
"client": {
"first_name": "Max",
"last_name": "Mustermann",
"email": "max.mustermann.final@web.de",
"phone": "+49123456789"
},
"custom": {}
}

Jo Han wrote:

Okay, I’ll take a step back ;D

I’m trying to create an Alexa skill that allows me to make a booking via node.js Lambda.
This raises the question of which “custom features” I need to set up for my booking page.
Do I need to use “intake forms”? If so, with which values? Should I use client fields? Do “customers” need to register with Simplybook, or can they book appointments without an account?
I’m currently stuck and would appreciate some help.

ty :slight_smile:

Redmine Admin wrote:

Hi, we just released AI chat booking, you can enable this custom feature and try it out.