import { whopSdk } from "@/lib/whop-sdk";const result = await whopSdk.access.checkIfUserHasAccessToExperience({ // The ID of the experience experienceId: "exp_XXXXXXXX" /* Required! */, // The ID of the user userId: "user_XXXXXXXX",});
Example output:
Copy
Ask AI
const response = { // Whether the user has access to the resource hasAccess: true, // The permission level of the user accessLevel: "admin" /* Valid values: admin | customer | no_access */,};
Assistant
Responses are generated using AI and may contain mistakes.
import { whopSdk } from "@/lib/whop-sdk";const result = await whopSdk.access.checkIfUserHasAccessToExperience({ // The ID of the experience experienceId: "exp_XXXXXXXX" /* Required! */, // The ID of the user userId: "user_XXXXXXXX",});
Example output:
Copy
Ask AI
const response = { // Whether the user has access to the resource hasAccess: true, // The permission level of the user accessLevel: "admin" /* Valid values: admin | customer | no_access */,};
Assistant
Responses are generated using AI and may contain mistakes.