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."
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan."
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan."
}
}Accounts
Connect account
Returns a five-minute browser connection URL bound to the API-key profile. Facebook, Instagram, LinkedIn personal profiles, Pinterest, Reddit, Threads, TikTok, X, and YouTube return direct provider OAuth URLs. Bluesky returns a PostOnce-hosted app-password form. No existing PostOnce browser session is required. Creating the URL does not confirm connection; list accounts after authorization to verify it.
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."
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan."
}
}{
"error": {
"code": "workflow_limit_reached",
"message": "You have reached the maximum number of workflows for your plan."
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Social platform to connect.
Available options:
bluesky, facebook, instagram, linkedin, pinterest, reddit, snapchat, threads, tiktok, twitter, youtube Response
Account connection URL created successfully.
Show child attributes
Show child attributes
⌘I
