Getting started
Set up the API client
We provide a TS client that makes it super easy to use our API. We highly recommend you use this client.
Our SDK makes it simple to use our API. It’s a wrapper around our GraphQL API with pre-built functions for all of our endpoints. The endpoints are outlined in the SDK reference section of our docs.
Install
Setup your client
Create a new file that instantiates the client and exports it. We recommend putting this file at lib/whop-api.ts
.
This file reads your ENV keys, which can be found on your app developer page on the Whop dashboard.
Example usage
The rest of the examples in this section will use this client and import it from lib/whop-api.ts
.
Here is an example