This operation is only available on the server.

Required Permissions

  • developer:basic:read
  • access_pass:basic:read (optional)

Usage

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

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

	after: "pageInfo.endCursor",

	before: "pageInfo.startCursor",

	first: 10,

	last: 10,
});

Example output

const result = {
	// The app for the company
	apps: {
		// The total number of items in this connection.
		totalCount: 10,

		// Information to aid in pagination.
		pageInfo: {
			// When paginating forwards, the cursor to continue.
			endCursor: "some string",

			// When paginating forwards, are there more items?
			hasNextPage: true,

			// When paginating backwards, are there more items?
			hasPreviousPage: true,

			// When paginating backwards, the cursor to continue.
			startCursor: "some string",
		},

		// A list of nodes.
		nodes: [
			{
				// The ID of the app
				id: "xxxxxxxxxxx",

				// The name of the app
				name: "some string",

				// The description of the app
				description: "some string",

				// If the status is live, the app is visible on Whop discovery. In order to be
				// live, you need to set the name, icon, and description. Being unlisted or
				// hidden means it's not visible on Whop but you can still install the app via
				// direct link. To remove the app from whop discovery, you should set the status to unlisted.
				status: "hidden" /* Valid values: hidden | live | unlisted */,

				// The icon for the app. This icon is shown on discovery, on the product page, on
				// checkout, and as a default icon for the experiences.
				icon: {
					// The source of the attachment
					source: {
						// The URL to access the attachment
						url: "some string",
					},
				},

				// Whether the app is using the default icon. We have this b/c icon is null
				// false, but we need to tell the user if they are using the default icon so they change it.
				usingDefaultIcon: true,

				// The base url of the app
				baseUrl: "some string",

				// The developer base url of the app
				baseDevUrl: "some string",

				// The path for the hub view of the app
				experiencePath: "some string",

				// The path part for a specific view of the app. This is the template part of the
				// url after the base domain. Eg: /experiences/[experienceId]
				discoverPath: "some string",

				// The path part for a specific view of the app. This is the template part of the
				// url after the base domain. Eg: /experiences/[experienceId]
				dashboardPath: "some string",

				// A collection of stats for the app.
				stats: {
					// This is the number of users that have spent time in this app in the last 24 hours.
					dau: 10,

					// This is the number of users that have spent time in this app in the last 28 days.
					mau: 10,

					// This how much time, in seconds, users have spent in this app in the last 24 hours.
					timeSpentLast24HoursInSeconds: 10,

					// This is the number of users that have spent time in this app in the last 7 days.
					wau: 10,
				},

				// The access pass that is used to sell the app
				accessPass: {
					// The internal ID of the public access pass.
					id: "xxxxxxxxxxx",

					// The status of the access pass in the marketplace.
					marketplaceStatus:
						"live_marketplace" /* Valid values: live_marketplace | not_available | pending_review */,
				},
			},
		],
	},
};