List Users
Page through every active learner in your account. List responses are
cursor-paginated — follow the more / next_cursor fields until more is
false.
API endpoints:
note
This example assumes you already have an access_token — see
Authentication.
import httpx
# Page through all active learners
users = []
cursor = None
while True:
params = {"limit": 100, "is_learner": True, "is_archived": False}
if cursor:
params["cursor"] = cursor
response = httpx.get(
f"https://your-account.wyzed.com/v3_user/tenants/{tenant_id}/users/",
headers={
"Authorization": f"Bearer {access_token}",
},
params=params,
)
response.raise_for_status()
# Response shape: {"users": [...], "more": true, "next_cursor": "..."}
data = response.json()
users.extend(data["users"])
if not data["more"]:
break
cursor = data["next_cursor"]
print(f"Retrieved {len(users)} active learners")
for user in users:
print(f"- {user['firstname']} {user['surname']} ({user['email']})")