# Keys and passcode

![Participants use the passcode or keys to easily connect RACEMAP App for live tracking. ](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2FzP3HrK35ZlogGR8J0rRN%2Fredeem-key-process.gif?alt=media\&token=a91695ce-35a5-4eea-a269-b6eb6dea005f)

{% hint style="success" %}
Test live tracking of the event "Easy QR Code Run" with RACEMAP App (passcode 6G615L):

* Leaderboard: [racemap.com/timing/qrcode-test](https://racemap.com/timing/qrcode-test)
* Tracking map: [racemap.com/player/qrcode-test](https://racemap.com/player/qrcode-test?embed=true)

There are two options for automatically connecting RACEMAP App for live tracking in this event:&#x20;

* Click the link <https://racemap.app/redeem_key?key=6G615L>
* Scan the QR code (which is equal to the key link)\
  &#x20;<img src="https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2Fb0koIz490AEYcj0KsdHb%2F6G615L.png?alt=media&#x26;token=91854e86-57f3-45e3-b9e9-e866bac77b64" alt="" data-size="original">&#x20;

After sign-up, you can contribute your activities to the activity challenge.
{% endhint %}

Keys are specific [deep links](https://docs.racemap.com/apps/tracking/deep-links) that target functions in our apps. Through keys, you can sell live tracking in the online registration for your event. Merge the participant data with a specific key. Distribute the key with the registration email or as a printed QR code. Keys enable an automated and convenient process for live tracking with RACEMAP apps.&#x20;

## APIs for keys

You can automatically process keys through APIs, e.g., when selling live tracking in an online registration platform. You need to authenticate the requests to the APIs.

{% content-ref url="../../api/authentication" %}
[authentication](https://docs.racemap.com/api/authentication)
{% endcontent-ref %}

#### Generating keys via API

Endpoint to automatically generate keys on demand:&#x20;

```json
 https://racemap.com/api/events/:eventId/actions/generate_starter_keys?count=10
```

Replace `:eventId` with the id of your addressed event. Set the number according to your demand, eg. `11` to generate 11 keys. More keys can be generated at any time.&#x20;

#### Querying keys via API

Endpoint to automatically retrieve keys:

```json
https://racemap.com/api/events/:evenId/starter_keys?format=json
```

#### Generating QR code images

Endpoint to generate a QR code image for a specific key:

```json
https://racemap.com/api/starters/actions/generate_key_qrcode?key=[key]
```

Replace `[key]` with the desired key. For instance, to generate a QR code for the passcode `6G615L` (from the "Easy QR Code Run" sample), use:&#x20;

```json
https://racemap.com/api/starters/actions/generate_key_qrcode?key=6G615L
```

The API request returns the QR code image, which you can embed or display directly in your application (e.g., within an email, newsletter, or dashboard).

<figure><img src="https://racemap.com/api/starters/actions/generate_key_qrcode?key=6G615L" alt=""><figcaption></figcaption></figure>

## Properties of keys and the passcode

* Assigned to one specific event, can't be used for a different event,
* Six characters, upper or lower case is irrelevant.
* Each with a specific landing page: `https://racemap.app/redeem_key?key=[key]`.

| Application                                            | Keys                                                                                    | Passcode                                              |
| ------------------------------------------------------ | --------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| Usage for the event                                    | Multiple keys for one event                                                             | One passcode for one event                            |
| Usage by participants                                  | Personalized: each participant uses a different key                                     | Each participant uses the same passcode for one event |
| Merge with participant data                            | Match participant's name & race number with a specific key eg. in registration platform | No match with individual participant data possible    |
| Assign location data during the event - Total activity | Accumulate multiple activities with Racemap App                                         | Accumulate multiple activities with Racemap App       |
| Assign location data - Sum-up activities               | With Racemap App and upload recorded activities                                         | With Racemap App, only                                |

Read more about the synchronization of participant data with an event in RACEMAP:

{% content-ref url="../../api-import-and-export-data" %}
[api-import-and-export-data](https://docs.racemap.com/api-import-and-export-data)
{% endcontent-ref %}

Learn more about keys to upload recorded activities from fitness trackers such as Garmin and Polar:

{% content-ref url="../../live-tracking/activity-upload" %}
[activity-upload](https://docs.racemap.com/live-tracking/activity-upload)
{% endcontent-ref %}

## Connect RACEMAP App for live tracking

Participants require a key to connect RACEMAP App for live tracking in one specific event. There are three options for participants to redeem their key in the app:

* Scan QR code.
* Click the key link.
* Manually paste the key in the search field of RACEMAP App.

#### Link to **redeem a key in RACEMAP App**

`https://racemap.app/redeem_key?key=[key]`

The key link provides a seamless user flow to connect the participants' phones for live tracking. The convenient user experience scales with a huge number of participants and saves support time. The process dynamically guides participants independent from

* The user's phone is iOS or Android.&#x20;
* RACEMAP App is installed or not installed.
* The participant opens the key link on the smartphone or on the desktop.

![Key link landing page on desktop guides participants using their phones](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2FAk6zxfx0obnP0LwGtudQ%2Fredeem-key-page.png?alt=media\&token=8231e49e-a5c8-4f19-abb9-5d3a9836de45)

{% tabs %}
{% tab title="RACEMAP App is not installed " %}
![](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2F6p9gtjtY6OBk1zQ9dP8c%2Fredeem-key-phone-1.jpg?alt=media\&token=44f83566-72e8-4278-9a85-e47d3c05cbe3)  &#x20;

The key link forwards to the App Store or to Google Play to install the tracking app.&#x20;
{% endtab %}

{% tab title="RACEMAP App is installed" %}
![](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2F0FxvIfqv2GE8CuWEj4sK%2Fredeem-key-phone-2.jpg?alt=media\&token=a370dd52-b3ad-453c-a0ab-c1cbafcccc98)&#x20;

The key link&#x20;

* Opens RACEMAP App.
* Addresses the corresponding event. Participants don't search for their race.
* Automatically redeems the key. Participants don't type the six characters of the key.&#x20;
  {% endtab %}
  {% endtabs %}

![QR code on race kit to connect RACEMAP App for live tracking at ooredo marathon ](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSRNxaH2Ju9Flr7JhJD%2F-LVgyKgmJxIXhhAarqGz%2F-LVgzaDiRVDIcs4O6WxP%2FWhatsApp%20Image%202019-01-08%20at%2009.29.25.jpeg?alt=media\&token=8fcca7b9-f4d1-494b-853f-0bb4730c29e4)

* Add specific `startNumber` and `name`. Participants don't need to type their name and bib number. `*/redeem_key?key=[key]&startNumber=[STARTNUMBER]&name=[NAME]`. Test this sample on your phone <https://racemap.app/redeem_key?key=6G615L&startNumber=1&name=Peter> . &#x20;

#### **Redeem key manually**

Redeem a key respectively the passcode in the search field of RACEMAP App.

![](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2F3GWIg7ur62loNS9kmVZt%2Fredeem-key-phone-3.jpg?alt=media\&token=726a31a2-05f8-41a1-a7fc-d0b5d219fa32)
