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.

Usage

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

const result = await whopSdk.experiences.listAccessPassesForExperience({
	// The ID of the experience
	experienceId: "exp_XXXXXXXX" /* Required! */,
});

Example output

const result = {
	// The unique ID representing this experience
	experienceId: "xxxxxxxxxxx",

	// The products that this experience is attached to. This defines which set of
	// customers have access and can view this experience. If empty, this experience
	// is only visible to authorized users of the company
	accessPasses: [
		{
			// The internal ID of the public product.
			id: "xxxxxxxxxxx",

			// The title of the product. Use for Whop 4.0.
			title: "some string",

			// A short description of what the company offers or does.
			shortenedDescription: "some string",

			// Whether this product is Whop verified.
			verified: true,

			// This product will/will not be displayed publicly.
			visibility:
				"archived" /* Valid values: archived | hidden | quick_link | visible */,

			// The route of the product.
			route: "some string",

			// The number of active users for this product.
			activeUsersCount: 10,

			// The logo for the product.
			logo: {
				// The original URL of the attachment, such as a direct link to S3. This should
				// never be displayed on the client and always passed to an Imgproxy transformer.
				sourceUrl: "some string",
			},
		},
	],
};