Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 1.12 KB

README.md

File metadata and controls

69 lines (51 loc) · 1.12 KB

Whop License Middleware

A simple to use and deploy api for validating Whop license keys

Deploy with Vercel

Endpoints

Swagger documentation: https://whop-license-middleware.vercel.app/

Validate a key:

POST

/api/license/[key]/validate

Body:

{
  "metadata": {
    "anything": "you want"
  }
}

Reset a key:

POST

/api/license/[key]/reset

Update key metadata:

POST

/api/license/[key]/update

Body:

{
  "metadata": {
    "anything": "you want"
  }
}

Run locally

  1. Create a .env.local file in the project directory and add your Whop API key
WHOP_API_KEY=xxx
  1. Install the project dependencies:
npm ci
  1. Start the project:
npm run dev

The project will run at http://localhost:3000