Skip to content
OpenAppPhysical access, fully managed
Login

Send guest invitations

This sample shows how little code it takes to issue a time-bound access invite with the OpenApp SDKs. The same program structure is repeated in every shipped language so you can copy the version that fits your stack.

Canonical sources live in packages/sdk/samples/guest-invitation/ in the SDK mirror repository.

  1. Configure your API key and organization through the OPENAPP_API_KEY and OPENAPP_ORG_ID environment variables, and set the integration and portal names in the sample.
  2. Create a one-week access invite (a single schedules entry with expires_in: "1w").
  3. Share the public invite URL with your guests.

The API returns an invite_token; build the guest link as https://<your-app>/invite/<token> (same shape the dashboard uses). Guests then follow Public Access to claim and open the door.

send_guest_invitations.py
"""Create a time-bound access invite for guests."""
# SDK docs: https://openapp.house/docs/sdk/python/
import os
from openapp_sdk import Client
# Required environment variables:
# OPENAPP_API_KEY: generate at https://openapp.house/dashboard/settings/api-keys
# OPENAPP_ORG_ID: your organization ID, shown in the dashboard
OPENAPP_API_KEY = os.environ["OPENAPP_API_KEY"]
ORG_ID = os.environ["OPENAPP_ORG_ID"]
# Replace these with the names shown in your dashboard.
INTEGRATION_NAME = "Virtual Access Demo" # name shown in the dashboard
PORTAL_NAME = "Lobby Portal" # name shown in the dashboard
EXPIRES_IN = (
"1w" # One week; a schedule entry can also set exact valid_from / valid_to dates.
)
def main() -> None:
client = Client.connect(api_key=OPENAPP_API_KEY, org_id=ORG_ID)
integration = client.integrations.get_by_name(INTEGRATION_NAME)
portal = client.integrations.get_access_portal_by_name(
integration["id"], PORTAL_NAME
)
invite = client.integrations.create_access_invite(
integration["id"],
portal_ids=[portal["id"]],
name="Year-end celebration",
schedules=[{"expires_in": EXPIRES_IN}],
max_uses=50,
invitee_message={"en": "Welcome — use this link during the party hour."},
)
# Share this URL with your guests.
print(invite["invite_url"])
if __name__ == "__main__":
main()
ValueWhere to find it
API keyCreate an API key
Organization idDashboard or GET /orgs
Integration idDashboard → Integrations (Virtual Access)
Portal idIntegration → access portals

For the underlying HTTP contract see Create a time-bound guest invitation and Integrations — access invites.