Connect account
curl --request POST \
--url https://postonce.to/api/public/v1/accounts/connect/{platform} \
--header 'Authorization: Bearer <token>'import requests
url = "https://postonce.to/api/public/v1/accounts/connect/{platform}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://postonce.to/api/public/v1/accounts/connect/{platform}', 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://postonce.to/api/public/v1/accounts/connect/{platform}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://postonce.to/api/public/v1/accounts/connect/{platform}"
req, _ := http.NewRequest("POST", 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.post("https://postonce.to/api/public/v1/accounts/connect/{platform}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://postonce.to/api/public/v1/accounts/connect/{platform}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"hosted_url": "https://postonce.to/dashboard/accounts?connect=twitter&source=public_api",
"authorization_url": "https://www.tiktok.com/v2/auth/authorize/?client_key=...",
"mode": "oauth_authorization_url",
"platform": "twitter"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key.",
"hint": "<string>"
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan.",
"hint": "<string>"
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan.",
"hint": "<string>"
}
}Accounts
Connect account
Computes a five-minute browser authorization URL bound to the authenticated profile without connecting or changing an account. Open the returned URL in a separate browser step to authorize the provider; then list accounts to verify connection. Depending on platform, the browser uses provider OAuth or a PostOnce-hosted credential or signer flow. Never enter provider credentials in chat.
POST
https://postonce.to/api/public
/
v1
/
accounts
/
connect
/
{platform}
Connect account
curl --request POST \
--url https://postonce.to/api/public/v1/accounts/connect/{platform} \
--header 'Authorization: Bearer <token>'import requests
url = "https://postonce.to/api/public/v1/accounts/connect/{platform}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://postonce.to/api/public/v1/accounts/connect/{platform}', 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://postonce.to/api/public/v1/accounts/connect/{platform}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://postonce.to/api/public/v1/accounts/connect/{platform}"
req, _ := http.NewRequest("POST", 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.post("https://postonce.to/api/public/v1/accounts/connect/{platform}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://postonce.to/api/public/v1/accounts/connect/{platform}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"hosted_url": "https://postonce.to/dashboard/accounts?connect=twitter&source=public_api",
"authorization_url": "https://www.tiktok.com/v2/auth/authorize/?client_key=...",
"mode": "oauth_authorization_url",
"platform": "twitter"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key.",
"hint": "<string>"
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan.",
"hint": "<string>"
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan.",
"hint": "<string>"
}
}Authorizations
Scoped API key issued in PostOnce Settings. OAuth authorization grants are not currently supported.
Path Parameters
Social platform to connect.
Available options:
bluesky, facebook, farcaster, nostr, instagram, linkedin, pinterest, reddit, snapchat, threads, tiktok, twitter, youtube Response
Account connection URL created successfully.
Show child attributes
Show child attributes
