Skip to main content
GET
/
apps
/
{id}
/
logs
List App Logs
curl --request GET \
  --url https://api.whop.com/api/v1/apps/{id}/logs \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.whop.com/api/v1/apps/{id}/logs"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.whop.com/api/v1/apps/{id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/apps/{id}/logs",
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/apps/{id}/logs"

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/apps/{id}/logs")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.whop.com/api/v1/apps/{id}/logs")

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": [
    {
      "app_build_id": "<string>",
      "app_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "level": "<string>",
      "message": "<string>",
      "request_id": "<string>",
      "cpu_time_ms": 123,
      "outcome": "<string>",
      "request_method": "<string>",
      "request_path": "<string>",
      "response_status": 123,
      "stack": "<string>",
      "truncated": true,
      "wall_time_ms": 123
    }
  ],
  "page_info": {
    "has_next_page": true,
    "has_previous_page": true,
    "end_cursor": "<string>",
    "start_cursor": "<string>"
  }
}
{
"error": {
"message": "<string>",
"type": "<string>"
}
}
{
"error": {
"message": "<string>",
"type": "<string>"
}
}
{
"error": {
"message": "<string>",
"type": "<string>"
}
}

Authorizations

Authorization
string
header
required

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

id
string
required

The ID of the app, which will look like app_*************.

Query Parameters

app_build_id
string

Only return logs from this build.

level
enum<string>

Only return console lines of this level.

Available options:
log,
debug,
info,
warn,
error
query
string

Only return logs whose message contains this text (case-insensitive).

created_after
string<date-time>

Start of the time window as an ISO 8601 timestamp. Defaults to 7 days before created_before.

created_before
string<date-time>

End of the time window as an ISO 8601 timestamp. Defaults to now.

first
integer

The number of log lines to return (max 500).

after
string

A cursor for fetching logs after a previous page.

before
string

A cursor for fetching logs before a later page.

Response

logs listed

data
object[]
required
page_info
object
required