API Interfacing – LDAP Directory Verification
Presentation
In order to verify the existence of a user, we can interface with an API that informs us on the validity of the given email address. To do so, we interrogate a web service HTTP(S) in POST with a “X-Token” header, to only authorise our service to interrogate your API and two parameters “mail” and “resource_id” in the body of the request containing the email address to verify. The web service answers in JSON with a boolean (true/false) “user_valid”.
Process
In summary, here is the step-by-step process:
- A user makes a reservation on the website or the mobile app.
- We build a request to verify the given email address:
- Protocol: HTTP or HTTPS
- URL: URL that you communicate us
- Header :X-Token: Token to generate
- Body:
Example of curl request
- curl -X POST \
- https://validation-url.com/ \
- -H "Accept: application/json" \
- -H "Content-Type: application/json" \
- -H "X-Token: random-token" \
- -d '{
- "mail" : "utilisateur@etablissement.com",
- “resource_id” : 123
- }'
Response
Depending on the result (existing email adress, valid user, ...), the web service will send back a response:
- If the user is valid: {"user_valid":true}
- Is the user is not valid:
Related Articles
API: web integration and customisation
Introduction The term web API refers to several modules which can be integrated to a webpage to display web widgets featuring: The library's real-time occupancy (occupancy rate or waiting time) The establishment's opening hours Example of an ...
Integration of existing counting data with Affluences' software connector
Aim The Affluences tool is designed to be simple, modular and intelligent. Our vision is to provide a single management tool, bringing together data from different systems. The integration of existing systems is part of the Affluence DNA. Many of our ...
Visualise the bookings of several resources on the same calendar
The Reservations > Planning tab allows you to have visibility of the reservations made for a selected resource. You can view a schedule of bookings made for one or more resources by importing the booking calendar for these resources from an external ...
Administration
The Administration tab allows you to easily manage information regarding your institution. Managing information In the Profile information section, you can fill in all the information about your institution: Required information: name of the ...
Settings
Contact information In order to efficiently process requests, Affluences would like to be able to identify the role of the different people in your institution for optimal assistance. This information is confidential and used only for operational ...