Fetches an access pass based on the ID or the route
import { whopApi } from "@/lib/whop-api";
const result = await whopApi.getAccessPass({
// The ID or route of the access pass to fetch.
accessPassId: "prod_XXXXXXXX" /* Required! */,
});
const response = {
// Fetches an access pass based on the ID or the route
accessPass: {
// The internal ID of the public access pass.
id: "xxxxxxxxxxx",
// The title of the access pass. 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 access pass will/will not be displayed publicly.
visibility:
"archived" /* Valid values: archived | hidden | quick_link | visible */,
// The route of the access pass.
route: "some string",
// The number of active users for this access pass.
activeUsersCount: 10,
// The logo for the access pass.
logo: {
// This is the URL you use to render optimized attachments on the client. This should be used for apps.
url: "some string",
},
// The banner image for the access pass.
bannerImage: {
// This is the URL you use to render optimized attachments on the client. This should be used for apps.
url: "some string",
},
// The headline of the access pass.
headline: "some string",
// A short type of the company that this access pass belongs to.
company: {
// The ID (tag) of the company.
id: "xxxxxxxxxxx",
// The title of the company.
title: "some string",
},
// The average of all reviews for this access pass.
reviewsAverage: 10,
// The user that owns the access pass (company owner).
ownerUser: {
// The internal ID of the user.
id: "xxxxxxxxxxx",
// The name of the user from their Whop account.
name: "some string",
// The username of the user from their Whop account.
username: "some string",
// The user's profile picture
profilePicture: {
// This is the URL you use to render optimized attachments on the client. This should be used for apps.
url: "some string",
},
// Whether or not the user's phone is verified
phoneVerified: true,
// The city the user is from.
city: "some string",
// The country the user is from.
country: "some string",
},
},
};
Was this page helpful?