Connect Accounts
Link social media accounts via OAuth. Each platform has a one-click connect flow.
Start OAuth
GET /v1/connect/{platform}
Generates an OAuth URL for the specified platform. Redirect the user to this URL to authorize.
Query Parameters
redirect_url— string (optional) — Where to redirect after authorization. Defaults to your app's callback URL configured in the dashboard.
Supported Platforms
instagram— Via Facebook Business OAuthfacebook— Facebook Page OAuththreads— Via Instagram authenticationtiktok— TikTok Login Kittwitter— Twitter OAuth 2.0
Example
Python
import httpx
resp = httpx.get(
"https://api.socialsyncerapi.com/v1/connect/instagram",
headers={"Authorization": "Bearer sk_your_api_key"},
params={"redirect_url": "https://yourapp.com/callback"}
)
data = resp.json()
print(f"Auth URL: {data['authUrl']}")
print(f"State: {data['state']}") curl
curl "https://api.socialsyncerapi.com/v1/connect/instagram?redirect_url=https://yourapp.com/callback" \
-H "Authorization: Bearer sk_your_api_key" Node.js
const resp = await fetch(
"https://api.socialsyncerapi.com/v1/connect/instagram?redirect_url=https://yourapp.com/callback",
{ headers: { "Authorization": "Bearer sk_your_api_key" } }
);
const data = await resp.json();
console.log("Auth URL:", data.authUrl); Response
{
"authUrl": "https://www.facebook.com/v19.0/dialog/oauth?...",
"state": "owner123:instagram"
} Complete OAuth
POST /v1/connect/{platform}
Exchange the OAuth code for an access token and connect the account. Call this from your callback endpoint.
Request Body
{
"code": "oauth_code_from_callback",
"redirect_url": "https://yourapp.com/callback"
} Examples
Python
import httpx
resp = httpx.post(
"https://api.socialsyncerapi.com/v1/connect/instagram",
headers={"Authorization": "Bearer sk_your_api_key"},
json={
"code": "oauth_code_from_callback",
"redirect_url": "https://yourapp.com/callback"
}
)
data = resp.json()
print(f"Connected: {data['platform']} - {data['username']} (ID: {data['accountId']})") curl
curl -X POST https://api.socialsyncerapi.com/v1/connect/instagram \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"code": "oauth_code_from_callback",
"redirect_url": "https://yourapp.com/callback"
}' Node.js
const resp = await fetch("https://api.socialsyncerapi.com/v1/connect/instagram", {
method: "POST",
headers: {
"Authorization": "Bearer sk_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
code: "oauth_code_from_callback",
redirect_url: "https://yourapp.com/callback"
})
});
const data = await resp.json();
console.log("Connected:", data.platform, data.username); Response
{
"platform": "instagram",
"accountId": "ig_user_id",
"username": "mybusiness"
} List Connected Accounts
GET /v1/accounts
Returns all connected social accounts for the current API key.
Query Parameters
platform— string (optional) — Filter by platform name
Example
curl "https://api.socialsyncerapi.com/v1/accounts" \
-H "Authorization: Bearer sk_your_api_key" Response
{
"accounts": [
{
"platform": "instagram",
"accountId": "ig_user_id",
"username": "mybusiness",
"connectedAt": "2026-01-15T10:00:00Z"
},
{
"platform": "twitter",
"accountId": "tw_user_id",
"username": "@mybusiness",
"connectedAt": "2026-01-15T10:05:00Z"
}
]
} Disconnect Account
DELETE /v1/accounts/{platform}/{accountId}
Remove a connected social account. This revokes the OAuth token and deletes stored credentials.
Example
curl -X DELETE https://api.socialsyncerapi.com/v1/accounts/instagram/ig_user_id \
-H "Authorization: Bearer sk_your_api_key" Response
{
"deleted": true
} Account Health
GET /v1/accounts/health
Check if your connected accounts are healthy. Returns token validity, permissions status, and recommendations for each account.
Example
Python
import httpx
resp = httpx.get(
"https://api.socialsyncerapi.com/v1/accounts/health",
headers={"Authorization": "Bearer sk_your_api_key"}
)
for account in resp.json()["accounts"]:
print(f"{account['platform']}: {account['health']}") curl
curl "https://api.socialsyncerapi.com/v1/accounts/health" \
-H "Authorization: Bearer sk_your_api_key" Node.js
const resp = await fetch("https://api.socialsyncerapi.com/v1/accounts/health", {
headers: { "Authorization": "Bearer sk_your_api_key" }
});
const data = await resp.json();
data.accounts.forEach(a => console.log(a.platform + ":", a.health)); Response
{
"accounts": [
{
"platform": "instagram",
"accountId": "ig_user_id",
"username": "mybusiness",
"health": "healthy",
"tokenValid": true,
"permissions": ["instagram_basic", "instagram_content_publish"],
"recommendations": []
}
]
}