List Social Connections
curl --request GET \
--url https://api.example.com/social/connectionsimport requests
url = "https://api.example.com/social/connections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/social/connections', 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.example.com/social/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/social/connections"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/social/connections")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/social/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodySocial
List Social Connections
List connected social accounts that can be used as post destinations.
GET
/
social
/
connections
List Social Connections
curl --request GET \
--url https://api.example.com/social/connectionsimport requests
url = "https://api.example.com/social/connections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/social/connections', 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.example.com/social/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/social/connections"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/social/connections")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/social/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns connected social accounts for the API key’s organization. Use
social_connection_id values in POST /social/post when you need to target specific accounts, including multiple accounts on the same platform.
Use POST /social/connections to create a new social connection setup flow.
Request
curl -X GET "https://api.mosaic.so/social/connections" \
-H "Authorization: Bearer mk_your_api_key"
Response
{
"connected_accounts": [
{
"social_connection_id": "4df2f2b9-4c5f-4b3a-9581-1bcb8b4f7d01",
"platform": "x",
"account_name": "Mosaic",
"account_username": "mosaic_so",
"profile_url": "https://x.com/mosaic_so"
},
{
"social_connection_id": "7f9388af-26e8-4e68-a52b-6b9a0ef3a017",
"platform": "linkedin",
"account_name": "Mosaic",
"account_username": "mosaic-so",
"profile_url": "https://www.linkedin.com/company/mosaic-so"
},
{
"social_connection_id": "62c07212-eeb5-40e2-9902-e478027b8628",
"platform": "x",
"account_name": "Motion",
"account_username": "motion_so",
"profile_url": "https://x.com/motion_so"
},
{
"social_connection_id": "8b59f2d7-53fa-4f47-9850-cb4b78b19a8d",
"platform": "linkedin",
"account_name": "Motion",
"account_username": "motion-so",
"profile_url": "https://www.linkedin.com/company/motion-so/"
}
]
}
Response Details
social_connection_ididentifies one connected account on one platform.- Organizations can have multiple connections for the same
platform; use explicitdestinationswhen posting to avoid ambiguity.
Was this page helpful?
⌘I