Getting started
Authentication
Resources
- Access Passes
- Attachments
- Authentication
- Chats
- Companies
- Direct Messages
- Experiences
- Forums
- Notifications
- Payments
- Users
Access Passes
Get Access Pass
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! */,
});
Example output:
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: {
// 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",
},
// The banner image for the access pass.
bannerImage: {
// 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",
},
// 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: {
// 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",
},
// 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?
Assistant
Responses are generated using AI and may contain mistakes.