Skip to main content
GET
/
forum_posts
/
{id}
Retrieve forum post
curl --request GET \
  --url https://api.whop.com/api/v1/forum_posts/{id} \
  --header 'Authorization: Bearer <token>'
import requests

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

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

url = URI("https://api.whop.com/api/v1/forum_posts/{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
{
  "attachments": [
    {
      "content_type": "image/jpeg",
      "filename": "document.pdf",
      "id": "<string>",
      "url": "https://media.whop.com/abc123/optimized.jpg"
    }
  ],
  "comment_count": 42,
  "content": "## My Strategy\n\nHere are the key steps...",
  "created_at": "2023-12-01T05:00:00.401Z",
  "id": "<string>",
  "is_edited": true,
  "is_pinned": true,
  "is_poster_admin": true,
  "like_count": 42,
  "parent_id": "<string>",
  "title": "Weekly Market Analysis - February 2025",
  "updated_at": "2023-12-01T05:00:00.401Z",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "view_count": 42
}
{
  "error": {
    "code": "parameter_missing",
    "message": "Missing required parameter: amount.",
    "param": "amount",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "message": "Invalid or missing API key",
    "type": "unauthorized"
  }
}
{
  "error": {
    "message": "You do not have permission to access this resource",
    "type": "forbidden"
  }
}
{
  "error": {
    "message": "Resource not found",
    "type": "not_found"
  }
}
{
  "error": null
}
{
  "error": null
}
{
  "error": {
    "message": "An unexpected error occurred",
    "type": "internal_server_error"
  }
}

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 unique identifier of the forum post to retrieve.

Response

A successful response

A post or comment in a forum feed, supporting rich text, attachments, polls, and reactions.

attachments
object[]
required

All file attachments on this post, such as images, documents, and videos.

comment_count
integer
required

The total number of direct comments on this post.

Example:

42

content
string | null
required

The body of the forum post in Markdown format. Null if the post is paywalled and the current user does not have access.

Example:

"## My Strategy\n\nHere are the key steps..."

created_at
string<date-time>
required

The time this post was created, as a Unix timestamp.

Example:

"2023-12-01T05:00:00.401Z"

id
string
required

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

is_edited
boolean
required

Whether this post has been edited after its initial creation.

is_pinned
boolean
required

Whether this post is pinned to the top of the forum feed.

is_poster_admin
boolean
required

Whether the author of this post is an admin of the company that owns the forum.

like_count
integer | null
required

The total number of like reactions this post has received.

Example:

42

parent_id
string | null
required

The unique identifier of the parent post. Null if this is a top-level post.

title
string | null
required

The headline of the forum post. Null if the post has no title.

Example:

"Weekly Market Analysis - February 2025"

updated_at
string<date-time>
required

The time this post was last updated, as a Unix timestamp.

Example:

"2023-12-01T05:00:00.401Z"

user
object
required

The user who authored this forum post.

view_count
integer | null
required

The total number of times this post has been viewed by users.

Example:

42