Skip to main content
This function and all other functions in this graphql sdk are deprecated. Please migrate to the new rest api.
This operation is only available on the server.

Required Permissions

  • company:authorized_user:read
  • company:authorized_user:email:read (optional)

Usage

import { whopSdk } from "@/lib/whop-sdk";

const result = await whopSdk.companies.listAuthorizedUsers({
	// ID of the company, either the tag (biz_xxx) or the page route (whop-dev)
	companyId: "biz_XXXXXXXX" /* Required! */,
});

Example output

const result = {
	// All of a company's added team members.
	authorizedUsers: [
		{
			// A unique ID representing the authorized user object.
			id: "xxxxxxxxxxx",

			// The name of the authorized user.
			name: "some string",

			// The Whop username of the authorized user.
			username: "some string",

			// The user ID of the authorized user.
			userId: "xxxxxxxxxxx",

			// The email of the authorized user.
			email: "some string",

			// The role of the authorized user in the company.
			role: "admin" /* Valid values: admin | app_manager | manager | moderator | owner | sales_manager | support */,
		},
	],
};