List project users
client.admin.organization.projects.users.list(stringprojectID, UserListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectUser { id, added_at, object, 3 more } >
GET/organization/projects/{project_id}/users
List project 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 projectUser of client.admin.organization.projects.users.list('project_id')) {
console.log(projectUser.id);
}{
"object": "list",
"data": [
{
"object": "organization.project.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}
],
"first_id": "user-abc",
"last_id": "user-xyz",
"has_more": false
}
Returns Examples
{
"object": "list",
"data": [
{
"object": "organization.project.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}
],
"first_id": "user-abc",
"last_id": "user-xyz",
"has_more": false
}