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

# Using Instant Keys

> Learn how to deliver Instant Keys — shareable unlock links that work without an app download — through Access Grants.

Instant Keys are the fastest way to give someone mobile access. When you create an Access Grant with a `mobile_key` access method, Seam automatically generates an Instant Key URL. Share this URL with your user through text, email, or your app. When they tap the link, they can unlock the door immediately — no app download required.

Instant Keys use iOS App Clips and Android Instant Apps to provide a native unlock experience without requiring your user to install anything.

Instant Keys are ideal for:

* **Guest access** — Send a link to a short-term guest (hotel, vacation rental, coworking space).
* **Backup access** — Provide a fallback unlock method alongside a native mobile key in your app.
* **Quick onboarding** — Let users unlock immediately while they set up your full mobile app.

***

## Before You Begin

To use Instant Keys, you need:

* A [Seam API key](https://console.seam.co)
* A connected ACS with BLE-capable lock hardware that supports mobile keys
* Mobile key licenses activated for your ACS (see [Setting Up Your Site for Instant Keys](/capability-guides/instant-keys/setting-up-your-site-for-instant-keys))
* A [user identity](/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) representing the person who will receive the Instant Key
* An entrance that supports mobile keys (`can_unlock_with_mobile_key` is `true`)

<Info>
  Instant Keys are generated automatically when you create a mobile key access method. You do not need to request them separately.
</Info>

***

## Step 1: Create an Access Grant with a Mobile Key

Create an [Access Grant](/use-cases/granting-access/index) specifying `mobile_key` as the requested access method mode. The response includes an `instant_key_url` on the Access Grant itself — you can share it immediately without waiting for the access method to be issued.

<CodeGroup>
  ```javascript JavaScript theme={null}
  const accessGrant = await seam.accessGrants.create({
    user_identity_id: '22222222-2222-2222-2222-222222222222',
    acs_entrance_ids: ['f74e4879-5991-4e2f-a368-888983dcfbfc'],
    requested_access_methods: [
      { mode: 'mobile_key' }
    ],
    starts_at: '2025-07-13T15:00:00.000Z',
    ends_at: '2025-07-16T11:00:00.000Z',
  })

  console.log(accessGrant.instant_key_url)
  // => "https://ik.seam.co/ABCXYZ"
  ```

  ```python Python theme={null}
  access_grant = seam.access_grants.create(
      user_identity_id="22222222-2222-2222-2222-222222222222",
      acs_entrance_ids=["f74e4879-5991-4e2f-a368-888983dcfbfc"],
      requested_access_methods=[{"mode": "mobile_key"}],
      starts_at="2025-07-13T15:00:00.000Z",
      ends_at="2025-07-16T11:00:00.000Z",
  )

  print(access_grant.instant_key_url)
  # => "https://ik.seam.co/ABCXYZ"
  ```

  ```ruby Ruby theme={null}
  access_grant = seam.access_grants.create(
    user_identity_id: "22222222-2222-2222-2222-222222222222",
    acs_entrance_ids: ["f74e4879-5991-4e2f-a368-888983dcfbfc"],
    requested_access_methods: [{ mode: "mobile_key" }],
    starts_at: "2025-07-13T15:00:00.000Z",
    ends_at: "2025-07-16T11:00:00.000Z"
  )

  puts access_grant.instant_key_url
  # => "https://ik.seam.co/ABCXYZ"
  ```

  ```php PHP theme={null}
  $accessGrant = $seam->access_grants->create(
    user_identity_id: "22222222-2222-2222-2222-222222222222",
    acs_entrance_ids: ["f74e4879-5991-4e2f-a368-888983dcfbfc"],
    requested_access_methods: [["mode" => "mobile_key"]],
    starts_at: "2025-07-13T15:00:00.000Z",
    ends_at: "2025-07-16T11:00:00.000Z"
  );

  echo $accessGrant->instant_key_url;
  // => "https://ik.seam.co/ABCXYZ"
  ```

  ```csharp C# theme={null}
  var accessGrant = seam.AccessGrants.Create(
    userIdentityId: "22222222-2222-2222-2222-222222222222",
    acsEntranceIds: new List<string>
    {
      "f74e4879-5991-4e2f-a368-888983dcfbfc"
    },
    requestedAccessMethods: new List<RequestedAccessMethod>
    {
      new RequestedAccessMethod { Mode = "mobile_key" }
    },
    startsAt: "2025-07-13T15:00:00.000Z",
    endsAt: "2025-07-16T11:00:00.000Z"
  );

  Console.WriteLine(accessGrant.InstantKeyUrl);
  // => "https://ik.seam.co/ABCXYZ"
  ```

  ```java Java theme={null}
  var accessGrant = seam.accessGrants().create(
    AccessGrantsCreateRequest.builder()
      .userIdentityId("22222222-2222-2222-2222-222222222222")
      .acsEntranceIds(List.of(
        "f74e4879-5991-4e2f-a368-888983dcfbfc"
      ))
      .requestedAccessMethods(List.of(
        RequestedAccessMethod.builder()
          .mode("mobile_key")
          .build()
      ))
      .startsAt("2025-07-13T15:00:00.000Z")
      .endsAt("2025-07-16T11:00:00.000Z")
      .build()
  );
  ```

  ```bash cURL theme={null}
  curl -X 'POST' \
    'https://connect.getseam.com/access_grants/create' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
    "user_identity_id": "22222222-2222-2222-2222-222222222222",
    "acs_entrance_ids": ["f74e4879-5991-4e2f-a368-888983dcfbfc"],
    "requested_access_methods": [{ "mode": "mobile_key" }],
    "starts_at": "2025-07-13T15:00:00.000Z",
    "ends_at": "2025-07-16T11:00:00.000Z"
  }'
  ```
</CodeGroup>

**Output:**

```json theme={null}
{
  "access_grant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "user_identity_id": "22222222-2222-2222-2222-222222222222",
  "instant_key_url": "https://ik.seam.co/ABCXYZ",
  "requested_access_methods": [
    {
      "mode": "mobile_key",
      "created_access_method_ids": ["6ba7b810-9dad-11d1-80b4-00c04fd430c8"]
    }
  ],
  ...
}
```

***

## Step 2: Share the Instant Key URL

Once the access method is created, list the access methods for the Access Grant to get the `instant_key_url`.

Deliver the `instant_key_url` to your user. Common delivery methods include:

* **Text message (SMS)** — Send the URL directly to your user's phone.
* **Email** — Include the URL in a welcome or check-in email.
* **In-app link** — Embed the URL in your web or mobile app.
* **QR code** — Generate a QR code from the URL for physical signage.

When your user taps the link on their phone, the Instant Key opens as an iOS App Clip or Android Instant App. They can unlock the door immediately — no app store download needed.

<CodeGroup>
  ```javascript JavaScript theme={null}
  const accessMethods = await seam.accessMethods.list({
    access_grant_id: accessGrant.access_grant_id,
  })

  const instantKey = accessMethods[0]
  console.log(instantKey.instant_key_url)
  ```

  ```python Python theme={null}
  access_methods = seam.access_methods.list(
      access_grant_id=access_grant.access_grant_id
  )

  instant_key = access_methods[0]
  print(instant_key.instant_key_url)
  ```

  ```ruby Ruby theme={null}
  access_methods = seam.access_methods.list(
    access_grant_id: access_grant.access_grant_id
  )

  instant_key = access_methods[0]
  puts instant_key.instant_key_url
  ```

  ```php PHP theme={null}
  $accessMethods = $seam->access_methods->list(
    access_grant_id: $accessGrant->access_grant_id
  );

  $instantKey = $accessMethods[0];
  echo $instantKey->instant_key_url;
  ```

  ```csharp C# theme={null}
  var accessMethods = seam.AccessMethods.List(
    accessGrantId: accessGrant.AccessGrantId
  );

  var instantKey = accessMethods[0];
  Console.WriteLine(instantKey.InstantKeyUrl);
  ```

  ```java Java theme={null}
  var accessMethods = seam.accessMethods().list(
    AccessMethodsListRequest.builder()
      .accessGrantId(accessGrant.getAccessGrantId())
      .build()
  );
  ```

  ```bash cURL theme={null}
  curl -X 'POST' \
    'https://connect.getseam.com/access_methods/list' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
    "access_grant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'
  ```
</CodeGroup>

**Output:**

```json theme={null}
{
  "access_method_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "display_name": "Mobile Key",
  "mode": "mobile_key",
  "is_issued": true,
  "issued_at": "2025-06-16T16:55:03.924353Z",
  "instant_key_url": "https://ik.seam.co/ABCXYZ",
  ...
}
```

Use the `client_session_id` to look up the client session token, then pass it to the Seam mobile SDK to initialize your user's mobile app. For the complete mobile SDK integration guide, see [Mobile Access](/capability-guides/mobile-access/index).

<Info />

***

## Step 3: See Which Doors an Access Method Covers

An access method can cover multiple doors — for example, if the Access Grant includes several entrances or spaces. To see which doors an Instant Key unlocks, call `/access_methods/get_related` with the underlying mobile key's access method ID.

<CodeGroup>
  ```javascript JavaScript theme={null}
  const related = await seam.accessMethods.getRelated({
    access_method_ids: [accessMethod.access_method_id],
  })

  console.log(related.acs_entrances) // ACS entrances this Instant Key unlocks
  ```

  ```python Python theme={null}
  related = seam.access_methods.get_related(
      access_method_ids=[access_method.access_method_id]
  )

  print(related.acs_entrances)  # ACS entrances this Instant Key unlocks
  ```

  ```ruby Ruby theme={null}
  related = seam.access_methods.get_related(
    access_method_ids: [access_method.access_method_id]
  )

  puts related.acs_entrances  # ACS entrances this Instant Key unlocks
  ```

  ```php PHP theme={null}
  $related = $seam->access_methods->get_related(
    access_method_ids: [$accessMethod->access_method_id]
  );

  echo json_encode($related->acs_entrances);  // ACS entrances this Instant Key unlocks
  ```

  ```csharp C# theme={null}
  var related = seam.AccessMethods.GetRelated(
    accessMethodIds: new List<string> { accessMethod.AccessMethodId }
  );

  // related.AcsEntrances — ACS entrances this Instant Key unlocks
  ```

  ```java Java theme={null}
  var related = seam.accessMethods().getRelated(
    AccessMethodsGetRelatedRequest.builder()
      .accessMethodIds(List.of(accessMethod.getAccessMethodId()))
      .build()
  );
  ```

  ```bash cURL theme={null}
  curl -X 'POST' \
    'https://connect.getseam.com/access_methods/get_related' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
    "access_method_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"]
  }'
  ```
</CodeGroup>

***

## Next Steps

* [Instant Keys](/capability-guides/instant-keys/index) — Deep dive into how Instant Keys work, site setup, and advanced delivery options.
* [Delivering Instant Keys](/capability-guides/instant-keys/delivering-instant-keys) — Detailed guide for sharing Instant Keys with your users.
* [Using Mobile Keys](/use-cases/granting-access/using-mobile-keys) — Build a native mobile app experience with the Seam mobile SDKs.
