How can we help?

Prefilling questions with a secure token

When you send customers to the NeetoCal booking page from your website/application, you can prefill their details so they don't have to retype them. The usual way is to add the details to the link itself, for example ?name=Sam&[email protected]. This help article has more details.

That works, but it means the customer's personal information is inside the URL and can end up in browser history and server logs. This is not GDPR compliant.

If you'd rather keep that information out of the URL, you can use a prefill token.

With a prefill token, you first send the customer's details to the NeetoCal API and receive a "prefill token". Then you send the customer to the NeetoCal URL with this "prefill token".

NeetoCal reads the "prefill token" and fills in the form, so the details themselves never appear in the URL. Here is what happens from start to finish.

  1. The customer fills in a form on your site.

  2. Your website sends its details to NeetoCal and receives a "prefill token" in return.

  3. Your website sends the customer to the NeetoCal booking page with the "prefill token" in the link.

  4. NeetoCal looks up the "prefill token" and automatically fills in the booking questions.

Creating a prefill token

  1. If you don't already have an API key, create one from Admin panel > API Keys > Add API key. See API Keys for the full steps.

  2. From your website, send the customer's details to NeetoCal. Pass each answer inside a data object, and include your API key in the X-Api-Key header.

curl -X POST "https://example.neetocal.com/api/external/v1/prefill_tokens" \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{ "data": { "name": "Sam Taylor", "email": "[email protected]" } }'
  1. NeetoCal returns a prefill token that starts with pft_.

{ "prefill_token": "pft_k9f8a7b2c4d6e1a3f5b7" }

The keys inside data (name and email in the example above) are the field codes of your booking questions. Name and email use the name and email field codes by default. To fill any other question, use its field code as the key. See Pre-filling questions for how field codes work and how each question type is formatted.

Sending the customer to the prefilled booking page

  1. Add the token to your booking link as a prefill_token value:

https://example.neetocal.com/meeting-with-oliver-smith?prefill_token=pft_k9f8a7b2c4d6e1a3f5b7
  1. Redirect the customer to that link. When the booking page opens, the questions are already filled in with the details you stored, and none of those details appear in the URL.

How long does a prefill token last

A prefill token stays valid for up to 30 days. NeetoCal automatically removes tokens older than 30 days, so create the token close to the time you send the customer to the booking page.