Ver prévia do post
curl --request GET \
--url https://post.chatclean.com.br/api/posts/{post}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://post.chatclean.com.br/api/posts/{post}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://post.chatclean.com.br/api/posts/{post}/preview', 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://post.chatclean.com.br/api/posts/{post}/preview",
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://post.chatclean.com.br/api/posts/{post}/preview"
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://post.chatclean.com.br/api/posts/{post}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://post.chatclean.com.br/api/posts/{post}/preview")
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{
"post_id": "9d3c1f2a-6b4e-4c8a-9f1e-2a7b5c8d0e41",
"original_content": "Agora dá para agendar fios no X. Veja como funciona.",
"original_length": 52,
"platforms": [
{
"post_platform_id": "9d3c1f2b-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
"platform": "x",
"content_type": "x_post",
"sanitized_content": "Agora dá para agendar fios no X. Veja como funciona.",
"sanitized_length": 52,
"max_content_length": 280,
"truncated": false,
"thread_replies": [
{
"text": "2/ As respostas saem logo abaixo do primeiro post.",
"media": []
}
]
}
]
}{
"message": "Unauthenticated."
}{
"message": "Active subscription required."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"name": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 30 seconds."
}Posts
Ver prévia do post
Mostra, para cada destino ativo, o texto que a rede vai receber depois das regras de formatação dela e o tamanho dele frente ao limite da conta. Nada é publicado.
GET
/
posts
/
{post}
/
preview
Ver prévia do post
curl --request GET \
--url https://post.chatclean.com.br/api/posts/{post}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://post.chatclean.com.br/api/posts/{post}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://post.chatclean.com.br/api/posts/{post}/preview', 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://post.chatclean.com.br/api/posts/{post}/preview",
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://post.chatclean.com.br/api/posts/{post}/preview"
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://post.chatclean.com.br/api/posts/{post}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://post.chatclean.com.br/api/posts/{post}/preview")
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{
"post_id": "9d3c1f2a-6b4e-4c8a-9f1e-2a7b5c8d0e41",
"original_content": "Agora dá para agendar fios no X. Veja como funciona.",
"original_length": 52,
"platforms": [
{
"post_platform_id": "9d3c1f2b-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
"platform": "x",
"content_type": "x_post",
"sanitized_content": "Agora dá para agendar fios no X. Veja como funciona.",
"sanitized_length": 52,
"max_content_length": 280,
"truncated": false,
"thread_replies": [
{
"text": "2/ As respostas saem logo abaixo do primeiro post.",
"media": []
}
]
}
]
}{
"message": "Unauthenticated."
}{
"message": "Active subscription required."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"name": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 30 seconds."
}Authorizations
Chave de API do workspace, criada em Configurações > Chaves de API.
Path Parameters
Id do post. Um post de outro workspace devolve 404.
Response
A prévia do post.