List Discord channels
curl --request GET \
--url https://app.trypost.it/api/social-accounts/{account}/channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trypost.it/api/social-accounts/{account}/channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trypost.it/api/social-accounts/{account}/channels', 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://app.trypost.it/api/social-accounts/{account}/channels",
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://app.trypost.it/api/social-accounts/{account}/channels"
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://app.trypost.it/api/social-accounts/{account}/channels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trypost.it/api/social-accounts/{account}/channels")
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{
"channels": [
{
"id": "1123456789012345678",
"name": "announcements"
},
{
"id": "1123456789012345679",
"name": "general"
}
]
}{
"message": "Unauthenticated."
}{
"message": "Active subscription required."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "Channels are only available for Discord accounts."
}{
"name": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 30 seconds."
}{
"message": "Server Error"
}{
"message": "Discord channel lookup failed (503)."
}Social accounts
List Discord channels
Lists the channels of a Discord account’s server that TryPost’s bot can post in, read from Discord and kept for 5 minutes per server. Use a channel id as meta.channel_id on a Discord destination. This endpoint also counts against a limit of 60 requests per minute per user, shared with the other Pinterest, Discord, TikTok and Instagram lookup endpoints and with the same user’s channel lookups in the TryPost app.
GET
/
social-accounts
/
{account}
/
channels
List Discord channels
curl --request GET \
--url https://app.trypost.it/api/social-accounts/{account}/channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trypost.it/api/social-accounts/{account}/channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trypost.it/api/social-accounts/{account}/channels', 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://app.trypost.it/api/social-accounts/{account}/channels",
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://app.trypost.it/api/social-accounts/{account}/channels"
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://app.trypost.it/api/social-accounts/{account}/channels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trypost.it/api/social-accounts/{account}/channels")
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{
"channels": [
{
"id": "1123456789012345678",
"name": "announcements"
},
{
"id": "1123456789012345679",
"name": "general"
}
]
}{
"message": "Unauthenticated."
}{
"message": "Active subscription required."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "Channels are only available for Discord accounts."
}{
"name": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 30 seconds."
}{
"message": "Server Error"
}{
"message": "Discord channel lookup failed (503)."
}
