Google Apps Meet API Client Library

0.4.0 · active · verified Fri Apr 17

The `google-apps-meet` library provides a Python client for interacting with the Google Meet API, enabling programmatic creation and management of Meet spaces. It is part of the larger `google-cloud-python` monorepo, currently at version 0.4.0, and receives frequent updates alongside other Google Cloud client libraries.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize the `SpacesServiceClient` and create a new Google Meet space using default settings. Ensure your environment is authenticated with Google Cloud credentials before running.

import os
from google.apps.meet_v2beta import SpacesServiceClient
from google.apps.meet_v2beta.types import Space

# --- Authentication Setup ---
# The client library automatically looks for credentials in the following order:
# 1. The GOOGLE_APPLICATION_CREDENTIALS environment variable.
# 2. Credentials from `gcloud auth application-default login`.
# 3. Credentials from the Google Cloud SDK (e.g., from `gcloud auth login`).
# For local development, set GOOGLE_APPLICATION_CREDENTIALS or use `gcloud auth application-default login`.
# Example: export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/keyfile.json"

# Initialize the client
client = SpacesServiceClient()

# Create a new Google Meet space
# An empty Space object is often sufficient for creation, letting the API fill in defaults.
# For advanced configuration, populate the Space object with a SpaceConfig.
new_space = Space()

try:
    created_space = client.create_space(space=new_space)

    print(f"Successfully created Meet Space.")
    print(f"Space Name: {created_space.name}")
    print(f"Meeting URI: {created_space.meeting_uri}")

except Exception as e:
    print(f"An error occurred: {e}")
    if "credentials" in str(e) or "Permission denied" in str(e):
        print("Hint: Check your authentication setup and IAM permissions (e.g., 'Google Meet Admin SDK' role).")

view raw JSON →