Skip to main content
GET
/
users
/
{id}
/
access
/
{resource_id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  appID: 'app_xxxxxxxxxxxxxx',
  apiKey: 'My API Key',
});

const response = await client.users.checkAccess('resource_id', { id: 'user_xxxxxxxxxxxxx' });

console.log(response.access_level);
{
  "has_access": true,
  "access_level": "no_access"
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Path Parameters

id
string
required

The ID (user_xxx) or username of the user

Example:

"user_xxxxxxxxxxxxx"

resource_id
string
required

The ID of the resource. Can be a company (biz_xxx), product (prod_xxx), or experience (exp_xxx)

Response

A successful response

The result of a has access check for the developer API

has_access
boolean
required

Whether the user has access to the resource

access_level
enum<string>
required

The permission level of the user

Available options:
no_access,
admin,
customer