How the authorization URL works
A configuration in the admin portal can hold an Authorization URL. When a door with that configuration is about to unlock, Allthenticate sends an HTTPPOST to the URL. If the response status is 200, the door unlocks. Any other status denies access.
You write the URL in a query-string style for convenience, but Allthenticate does not send it that way:
- The query parameters are sent as a JSON object in the body of the
POST. %(email)sis replaced with the user’s email.%(smartcard)sis replaced with the user’s smartcard number. If the user has more than one, one of them is chosen at random.- A
headersparameter is removed from the body and sent as HTTP headers. Its value must be a JSON object.
headers. Any other name is sent in the body as an ordinary field.
Show the partner’s message
Set JSON Response Field to the name of the field in the partner’s JSON response that holds a message, so Allthenticate can show it. For example, if the partner responds:400, set the field to texts.
Set up the configuration and policy
1
Create an API key for the partner
Allthenticate creates your organization. A Super Admin then creates an API key under Settings and gives it to the gym software partner. See Allthenticate API.
2
Get the partner's URL
The partner sets up your gym on their side and gives you the URL Allthenticate should call when a member requests access, in the format above.
3
Create the configuration
In the admin portal, go to Configurations and click New Configuration. Enter a Configuration Name and Description, paste the URL into Authorization URL (Advanced), and set JSON Response Field (Advanced).
4
Test the URL
Click Test next to the URL. Allthenticate calls it with the email
test@allthenticate.com and smartcard 123456. A green notification shows the data the endpoint returned; otherwise you see the error.5
Create the groups and policy
Create a user group for members, such as
[Location] Members, and a door group for the gym’s doors, such as [Location] Doors. Then create a policy between the two groups that uses the configuration. Use a door group even with one reader, so you can add readers later. See Set up your organization for groups and policies.Partner API calls
The partner sends these calls with your API key. See Allthenticate API for authentication and the full reference.Add a member
CallPOST /invites with the member’s email and the member group:
add_ids maps each email to its Allthenticate user ID. To give the member a smartcard or barcode number, include it in the same call with the smartcards parameter (see Hospitality integration).
Remove a member
To revoke access, delete the user from the organization withDELETE /users and the member’s email.
Add a day-pass guest
Guests can get access for a limited time, for example 6 a.m. to 10 p.m. on one day, for day or monthly passes.1
Find the door IDs
Call
GET /groups with type=resources and resource_type=DOOR. Each group’s items lists its doors; note the resource_id of each door the guest should open.2
Create the guest link
Call
POST /magiclinkadmin with email_list, one resource_id_list per door, start_time (optional), end_time, a name for the temporary policy, and config_id set to the configuration you created, so the partner is still checked at each unlock. Dates are in UTC, formatted YYYY-MM-DD HH:mm:ss.Partner response format
The partner’s endpoint answers200 to allow access and a non-200 status to deny it. For example:
isAuthorized is informational.
Tell your members
You can add your gym’s logo to this poster and put it up at your gym, so members know how to get the Allthenticator app and how to reach Allthenticate support.
Member poster. Replace [YOUR GYM LOGO] with your logo.