> ## Documentation Index
> Fetch the complete documentation index at: https://help.allthenticate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect climbing gym software to your doors

> Connect gym management software to Allthenticate doors: check membership at every unlock with an authorization URL, and sync members and day passes with the API.

If your gym uses Redpoint HQ, use the built-in [Redpoint HQ integration](https://help.allthenticate.com/help/integrations/redpoint-hq.md) instead; it relies on the authorization URL described here.

## 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 HTTP `POST` 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)s` is replaced with the user's email.
* `%(smartcard)s` is replaced with the user's smartcard number. If the user has more than one, one of them is chosen at random.
* A `headers` parameter is removed from the body and sent as HTTP headers. Its value must be a JSON object.

```text theme={null}
https://example.com/allowaccess?email=%(email)s&headers={"x-api-key": "<partner API key>", "Content-Type": "application/json"}
```

The parameter must be named `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:

```json theme={null}
{"isAuthorized": false, "texts": "Waiver is expired."}
```

with status `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](https://help.allthenticate.com/help/integrations/api.md).

**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](https://admin.allthenticate.com), 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](https://help.allthenticate.com/get-started/set-up-organization.md) for groups and policies.

Your gym software partner may provide a script that creates the groups, configuration and policy for you. Ask it for the member group ID and the configuration ID; the API calls below need them.

## Partner API calls

The partner sends these calls with your API key. See [Allthenticate API](https://help.allthenticate.com/help/integrations/api.md) for authentication and the full reference.

### Add a member

Call `POST /invites` with the member's email and the member group:

```text theme={null}
POST https://api.allthenticate.com/invites
api_key=<API key>
emails=["alex@example.com"]
groups=[{"id": <member group ID>}]
```

The response's `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](https://help.allthenticate.com/help/integrations/hospitality.md#invite-guests-and-staff)).

### Remove a member

To revoke access, delete the user from the organization with `DELETE /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`.

All guest link parameters are listed under [Create guest links](https://help.allthenticate.com/help/integrations/hospitality.md#create-guest-links).

## Partner response format

The partner's endpoint answers `200` to allow access and a non-`200` status to deny it. For example:

```json Allowed (200) theme={null}
{
  "isAuthorized": true,
  "texts": "Access granted"
}
```

```json Denied (400) theme={null}
{
  "isAuthorized": false,
  "texts": "Waiver is expired."
}
```

Allthenticate decides from the status code; `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.

![Poster titled Your phone is now your key: members download the Allthenticator app, sign up with their membership email, and allow Bluetooth; QR codes link to the App Store, Google Play, the help center and support tickets](https://mintcdn.com/allthenticate-e69095b0/7yUU7sq9zDstLP_S/images/help/integrations/gym-member-poster.png?fit=max\&auto=format\&n=7yUU7sq9zDstLP_S\&q=85\&s=b4af90bbd569d0f916dc5ace78abcf21)

Member poster. Replace \[YOUR GYM LOGO] with your logo.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.