puter.teams.listMembers()Returns the accounts belonging to a team, including the owner account.
Any member may call it. The response carries no email address, activation state or usage — those stay on the administrative methods.
puter.teams.listMembers(uid)
puter.teams.listMembers(uid, options)
uid (String) (required)
The team's identifier.
options (Object) (optional)
The standard list options — limit, cursor, includeTotal and stream. See Pagination. offset is not accepted.
A Promise that resolves to an array of TeamMember objects, or to a { items, cursor? } page when a pagination option is given. With stream: true it returns an async iterator of pages instead.
List everyone in the first team
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
(async () => {
const [team] = await puter.teams.list();
if (!team) return puter.print('No team.');
for (const member of await puter.teams.listMembers(team.uid)) {
puter.print(`${member.username}${member.orgOwned ? ' (provisioned)' : ''}<br>`);
}
})();
</script>
</body>
</html>