List Accounts
List connected social accounts for the authenticated user.
GET /v1/accounts
List connected social accounts for the authenticated user.
Auth: Bearer API key (required)
Response 200
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"platform": "linkedin",
"username": "jane",
"profile_image_url": "https://example.com/avatar.jpg",
"is_active": true,
"token_expires_at": "2026-08-01T00:00:00.000Z",
"token_status": "ok",
"created_at": "2026-01-01T00:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
id | UUID | Connected account ID — use in platforms when posting |
platform | string | Platform enum (linkedin, instagram, etc.) |
username | string | Handle or display name |
profile_image_url | string | Avatar URL |
is_active | boolean | Whether the account is active |
token_expires_at | datetime | When the OAuth token expires |
token_status | string | ok, expiring_soon, or expired |
created_at | datetime | When the account was connected |
cURL
curl https://api.social0.app/v1/accounts \
-H "Authorization: Bearer sk_live_YOUR_KEY"JavaScript
const res = await fetch("https://api.social0.app/v1/accounts", {
headers: { Authorization: `Bearer ${process.env.SOCIAL0_API_KEY}` },
});
const { data } = await res.json();
const accountIds = data.map((a) => a.id);Python
import requests, os
r = requests.get(
"https://api.social0.app/v1/accounts",
headers={"Authorization": f"Bearer {os.environ['SOCIAL0_API_KEY']}"},
)
accounts = r.json()["data"]Errors
| HTTP | Code | When |
|---|---|---|
| 401 | invalid_api_key | Missing or invalid API key |