Skip to main content
MindBridge API Python Client can be installed with pip:
pip install mindbridge-api-python-client
It is recommended to install and run MindBridge API Python Client from a virtual environment, for example, using the Python standard library’s venv or using uv.

Usage

Before you begin, create an API token within your tenant by following Create an API token. There are several methods to securely store your API token and use it with your Python process. For this short example, it’s assumed that the following have been set as environment variables:
  • MINDBRIDGE_API_URL: Your MindBridge tenant URL, like [subdomain].mindbridge.ai
  • MINDBRIDGE_API_TOKEN: Your API token
This example script connects to your MindBridge tenant and calls the /v1/users/current endpoint to retrieve information about the authenticated user:
import os
import mindbridgeapi as mbapi

url = os.environ.get("MINDBRIDGE_URL", "")
token = os.environ.get("MINDBRIDGE_API_TOKEN", "")

server = mbapi.Server(url=url, token=token)

user = server.users.get_current()
print(f"Name: {user.first_name} {user.last_name}")
print(f"Role: {user.role}")
print(f"ID:   {user.id}")