Skip to main content
GET
/
accounts
List connected accounts
curl --request GET \
  --url https://api.social-api.ai/v1/accounts \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.social-api.ai/v1/accounts"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.social-api.ai/v1/accounts', 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.social-api.ai/v1/accounts",
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: <api-key>"
],
]);

$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.social-api.ai/v1/accounts"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

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.social-api.ai/v1/accounts")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.social-api.ai/v1/accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "count": 2,
  "data": [
    {
      "bio": "<string>",
      "brand_id": "<string>",
      "id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
      "metadata": {},
      "name": "Acme Corp",
      "platform": "instagram",
      "profile_picture_url": "<string>",
      "reconnect_reason": "<string>",
      "status": "active",
      "username": "acmecorp"
    }
  ]
}
{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}
{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}

Authorizations

Authorization
string
header
required

Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...

Query Parameters

brand_id
string

Filter accounts by brand ID

Response

List of connected accounts

count
integer
Example:

2

data
object[]