This page helps you get up and running with Whop in minutes

Get your API keys

To make a call to the Whop API, you need an API Token.

  • Go to the settings page of the Whop Business Dashboard
  • Click the Developer Tab
  • Click View credentials in the API Keys section
10291029

❗️

You will only see your Bearer token and client secret once. Make sure to copy it somewhere safe before exiting this modal.

454454

Store your Client ID, Client Secret, and Bearer Token in a safe place. You will need them to access the API. Currently, each organization can have one API key.

📘

If you want your token to be able to use your Bearer token, turn on Advanced API Mode on the Settings > Developers page.

10251025

Make your first request

To make your first request, send an authenticated request to the v1/licenses endpoint. This will fetch all of your existing licenses.

Take a look at how you might call this method via curl or Python:

curl https://api.whop.com/api/v1/licenses  
    -H "Authorization: Bearer {Bearer Token}"
In your terminal run:
  pip install whop

Create a file test.py with the following:
  # test.py 
    import whop

    client = whop.Whop(bearer="<Bearer Token>")
    resp = client.getLicenses()
    print(resp)

From your terminal excute the file:
In your terminal run:
    npm i whopapi

Create a file test.js with the following:
    // test.js
    var WhopApi = require('whopapi');

    var whop = new WhopApi.Whop({
        // You can pass in either or both of bearer and clientID.
        bearer: "<Bearer Token>",
        clientID: "<client ID>"
    });

    console.log(whop.getLicenses());

From your terminal, excute the file:
    node test.js
In your terminal run:
    go get github.com/whopio/whop-go-sdk

Create a file main.go with the following:
    package main
    
    import (
        "context"
        "fmt"
    
        "github.com/whopio/whop-go-sdk"
    )
    
    func main() {
        config := whop.Config{
                Bearer: "<Bearer Token>",
            }
        client := whop.NewWhop(config)
        ctx := context.Background()
    
        resp, _ := client.GetLicenses(ctx)
        fmt.Printf("%+v", resp)
    }

From your terminal, excute the file:
    go run main.go

Authentication

Whop's API works with both Bearer Authentication and Client ID auth (for a subset of the endpoints).

Bearer Authentication

Pass in Bearer <token> as the value of an Authorization header.

📘

If you want your token to be able to use your Bearer token, turn on Advanced API Mode on the Settings > Developers page.

With the Bearer token, you can hit all Whop endpoints. Be careful to not leak your Bearer token in client side code.

Client ID Authentication

Pass in <cliend ID> as the value of an Authorization header.

📘

The Fetch Membership, Update Membership, Validate Membership, and Reset Membership are the only endpoints that can be called with client ID instead of a Bearer token

You can safely embed your client ID in client side code.

❓ Authorization Difference