JavaScript
import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const person = await client.people.retrieve('person_id');
console.log(person.data);curl --request GET \
--url https://api.whop.com/api/v1/people/{person_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.whop.com/api/v1/people/{person_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/people/{person_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/people/{person_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.whop.com/api/v1/people/{person_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/people/{person_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"account_id": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"person_id": "<string>",
"purchase_count": 123,
"ad_sets": [
{
"id": "<string>",
"name": "<string>",
"thumbnail_url": "<string>"
}
],
"ads": [
{
"id": "<string>",
"name": "<string>",
"thumbnail_url": "<string>"
}
],
"aov": 123,
"campaigns": [
{
"id": "<string>",
"name": "<string>",
"thumbnail_url": "<string>"
}
],
"email": "<string>",
"has_failed_payment": true,
"ltv": 123,
"name": "<string>",
"phone": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}People
Retrieve Person
Retrieves one person for an account, aggregated from pixel events.
GET
/
people
/
{person_id}
JavaScript
import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const person = await client.people.retrieve('person_id');
console.log(person.data);curl --request GET \
--url https://api.whop.com/api/v1/people/{person_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.whop.com/api/v1/people/{person_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/people/{person_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/people/{person_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.whop.com/api/v1/people/{person_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/people/{person_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"account_id": "<string>",
"first_seen_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"person_id": "<string>",
"purchase_count": 123,
"ad_sets": [
{
"id": "<string>",
"name": "<string>",
"thumbnail_url": "<string>"
}
],
"ads": [
{
"id": "<string>",
"name": "<string>",
"thumbnail_url": "<string>"
}
],
"aov": 123,
"campaigns": [
{
"id": "<string>",
"name": "<string>",
"thumbnail_url": "<string>"
}
],
"email": "<string>",
"has_failed_payment": true,
"ltv": 123,
"name": "<string>",
"phone": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}Authorizations
A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Path Parameters
The ID of the person.
Query Parameters
The ID of the account, which will look like biz_*************. Optional for account API keys; required for credentials that can access multiple accounts.
Start of the time range as an ISO 8601 timestamp.
End of the time range as an ISO 8601 timestamp. Defaults to now.
Response
person retrieved
Show child attributes
Show child attributes
⌘I

