Skip to main content
GET
/
accounts
Get accounts
curl --request GET \
  --url https://mvp.tryunsora.com/api/v1/accounts \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://mvp.tryunsora.com/api/v1/accounts"

headers = {"Authorization": "Bearer <token>"}

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

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

fetch('https://mvp.tryunsora.com/api/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://mvp.tryunsora.com/api/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: 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://mvp.tryunsora.com/api/v1/accounts"

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://mvp.tryunsora.com/api/v1/accounts")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://mvp.tryunsora.com/api/v1/accounts")

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
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "provider": "<string>",
      "providerAccountId": "<string>",
      "accountName": "<string>",
      "accountUsername": "<string>",
      "profilePicture": "<string>",
      "expiresAt": "2023-11-07T05:31:56Z"
    }
  ]
}
{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}
Returns social accounts connected to the authenticated user. Use each account id when calling Create Post.
curl "https://mvp2.tryunsora.com/api/v1/accounts" \
  -H "Authorization: Bearer uns_live_YOUR_API_KEY"
Example response:
{
  "success": true,
  "data": [
    {
      "id": "cm123abc",
      "provider": "instagram",
      "providerAccountId": "...",
      "accountName": "My Page",
      "accountUsername": "mypage",
      "profilePicture": "https://...",
      "expiresAt": "2026-12-01T00:00:00.000Z"
    },
    {
      "id": "cm456def",
      "provider": "tiktok",
      "providerAccountId": "...",
      "accountName": "My TikTok",
      "accountUsername": "mytiktok",
      "profilePicture": "https://...",
      "expiresAt": "2026-12-01T00:00:00.000Z"
    }
  ]
}
provider values include instagram and tiktok.

Authorizations

Authorization
string
header
required

Clerk session JWT or Unsora API key (uns_live_*)

Response

Connected accounts list

success
boolean
required
data
object[]
required