List group users
client.admin.organization.groups.users.list(stringgroupID, UserListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<OrganizationGroupUser { id, email, name } >
GET/organization/groups/{group_id}/users
List group users
import OpenAI from 'openai';
const client = new OpenAI({
adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const organizationGroupUser of client.admin.organization.groups.users.list('group_id')) {
console.log(organizationGroupUser.id);
}{
"object": "list",
"data": [
{
"id": "user_abc123",
"name": "Ada Lovelace",
"email": "ada@example.com"
}
],
"has_more": false,
"next": null
}
Returns Examples
{
"object": "list",
"data": [
{
"id": "user_abc123",
"name": "Ada Lovelace",
"email": "ada@example.com"
}
],
"has_more": false,
"next": null
}