Portal Get Hub By Slug
curl --request GET \
--url https://api.member.dev/api/v1/hubs/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.member.dev/api/v1/hubs/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.member.dev/api/v1/hubs/{slug}', 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.member.dev/api/v1/hubs/{slug}",
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.member.dev/api/v1/hubs/{slug}"
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.member.dev/api/v1/hubs/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/hubs/{slug}")
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": {
"attributes": {
"branding": {},
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"discussions_default_description": "<string>",
"discussions_default_title": "<string>",
"is_private": true,
"legacy_hash": "<string>",
"meta": {},
"navigation": {},
"settings": {},
"slug": "<string>",
"team_id": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"homepage": {
"page_id": "<string>",
"kind": "custom"
},
"is_free": true,
"policies_enabled": false
},
"id": "<string>",
"type": "hubs"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}hubs-portal
Portal Get Hub By Slug
Retrieve a hub by globally unique slug (new portal bootstrap).
Public hubs (is_private=False) are accessible without authentication. Private hubs require a valid contact token whose team_ids list includes the hub’s team_id.
Replaces the deprecated GET /api/hub//hubs/ route.
GET
/
api
/
v1
/
hubs
/
{slug}
Portal Get Hub By Slug
curl --request GET \
--url https://api.member.dev/api/v1/hubs/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.member.dev/api/v1/hubs/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.member.dev/api/v1/hubs/{slug}', 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.member.dev/api/v1/hubs/{slug}",
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.member.dev/api/v1/hubs/{slug}"
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.member.dev/api/v1/hubs/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/hubs/{slug}")
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": {
"attributes": {
"branding": {},
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"discussions_default_description": "<string>",
"discussions_default_title": "<string>",
"is_private": true,
"legacy_hash": "<string>",
"meta": {},
"navigation": {},
"settings": {},
"slug": "<string>",
"team_id": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"homepage": {
"page_id": "<string>",
"kind": "custom"
},
"is_free": true,
"policies_enabled": false
},
"id": "<string>",
"type": "hubs"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}⌘I