Skip to content
OAOpenAppPhysical Security as a Service
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, organization, integration, and portal.
  2. Create a one-hour access invite (example: a year-end celebration from 2025-12-31T20:00:00Z to 2025-12-31T21:00:00Z).
  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/
from openapp_sdk import Client
# Replace the placeholder values below with your org's values from the dashboard.
# OPENAPP_API_KEY: generate at https://openapp.house/dashboard/resources/api-keys
OPENAPP_API_KEY = (
"https://openapp.house_openapp_9kHWAeFWbMqPg0hMKshNGba7scA6mfmISG7mgI7Eok8"
)
ORG_ID = "01KSYAX0BS1K7Y6R997XE1EWHY"
INTEGRATION_NAME = "Virtual Access Demo" # name shown in the dashboard
PORTAL_NAME = "Lobby Portal" # name shown in the dashboard
EXPIRES_IN = "1w" # One week; you can also set exact dates with valid_from / valid_to.
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",
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.