GET
/
check
/
{access_expression}
curl --request GET \
  --url https://access.api.whop.com/check/{access_expression} \
  --header 'Authorization: Bearer <token>'
{
  "access": true
}

Usage

This endpoint is used to check if the current user has access to a given access expression. It is used in the hasAccess function of the SDK. You can find more information about access expressions in the Expressions section.

Authorizations

Authorization
string
headerrequired

The users access token, this can be fetched from the whop_user_token cookie.

Path Parameters

access_expression
string
required

The access expression to be checked.

Response

200 - application/json
access
boolean