Authentication
All API requests require an API key passed in the Authorization header.
API Key Format
SocialSyncerAPI keys start with sk_ followed by a random string:
sk_abc123def456ghi789jkl012mno345 Using Your API Key
Include your key in every request's Authorization header as a Bearer token:
Python
import httpx
resp = httpx.get(
"https://api.socialsyncerapi.com/v1/accounts",
headers={"Authorization": "Bearer sk_your_api_key"}
)
print(resp.json()) Node.js
const resp = await fetch("https://api.socialsyncerapi.com/v1/accounts", {
headers: { "Authorization": "Bearer sk_your_api_key" }
});
const data = await resp.json(); curl
curl https://api.socialsyncerapi.com/v1/accounts \
-H "Authorization: Bearer sk_your_api_key" Getting Your API Key
- Sign up at app.socialsyncerapi.com/signup
- Navigate to Settings → API Keys
- Click Create API Key
- Copy your key — it's only shown once
Keep your API key secret. Never commit it to version control, embed it in client-side code, or share it in public repositories. Use environment variables.
Environment Variables
# .env
SOCIALAPI_KEY=sk_your_api_key
# Usage
import httpx
import os
resp = httpx.get(
"https://api.socialsyncerapi.com/v1/accounts",
headers={"Authorization": f"Bearer {os.environ['SOCIALAPI_KEY']}"}
) Error Responses
Missing API Key
HTTP/1.1 401 Unauthorized
{
"error": "Missing API key",
"code": "AUTH_MISSING_KEY"
} Invalid API Key
HTTP/1.1 401 Unauthorized
{
"error": "Invalid API key",
"code": "AUTH_INVALID_KEY"
} OAuth Flow
Connecting social accounts uses OAuth 2.0. The flow is:
- Call
GET /v1/connect/{platform}to get an auth URL - Redirect the user to the auth URL
- They're redirected back to your callback with a
codeparameter - Exchange the code:
POST /v1/connect/{platform}
User authorizes your app
See Connect Accounts for full details.
Rate Limits
- API requests: 60 requests/minute (free), 600/min (paid)
- Platform limits: Each platform has its own posting limits (see platform docs)
When rate limited, you'll receive a 429 Too Many Requests response. Implement exponential backoff.
HTTP/1.1 429 Too Many Requests
Retry-After: 60
{
"error": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED"
}