AUTOSOCIALS FOR DEVELOPERS
Create and manage workspace API keys
Create a scoped REST key, test a first read, and manage expiry, rotation and revocation.
Create and test a key
- Select a workspace and open API keys & connections. Workspace owners can create keys.
- Choose a label, the scopes you need and an expiry. Use channels:read for a REST test. For private model generation, select content:generate, videos:read and assets:read.
- Copy the key when it appears and store it in a secret manager or as AUTOSOCIALS_API_KEY on the machine making API calls. The centre displays it once.
- Send Authorization: Bearer <key> to GET https://autosocials.com/api/v1/channels. A successful response includes requestId and data.channels. An empty list means the workspace has no connected channels.
- For video, use the same Authorization header with https://autosocials.com/mcp in clients that support custom headers. In ChatGPT, connect via AutoSocials OAuth and grant those same permissions.
- Create a replacement key before expiry. Rotate an active key to replace its secret immediately. Rotation keeps the current expiry and invalidates the old secret. Update your integrations, then revoke keys you no longer use.
Authentication and recovery
Use the key as an Authorization: Bearer credential with REST or direct model tools on the full MCP endpoint. Use OAuth in ChatGPT and other hosts that manage sign-in. Keep credentials in a secret manager on the machine making the request.
A 401 can indicate a missing, expired or revoked key. A 403 can indicate a missing scope or workspace access. A 429 indicates a rate limit. Check the server-issued request ID and the request log in the API Centre before contacting https://autosocials.com/support.
For a paginated response, use the cursor and query parameters listed for that operation. For a write, reuse the original idempotency key with identical input to retry safely. See https://autosocials.com/openapi.json for the REST schemas.
Your first REST request
Use a securely stored workspace key with channels:read. Compare the returned request ID with the API Centre log.
PowerShell
$headers = @{ Authorization = "Bearer $env:AUTOSOCIALS_API_KEY" }
Invoke-RestMethod -Uri "https://autosocials.com/api/v1/channels" -Headers $headerscurl
curl --fail-with-body -H "Authorization: Bearer $AUTOSOCIALS_API_KEY" https://autosocials.com/api/v1/channelsJavaScript
const response = await fetch("https://autosocials.com/api/v1/channels", {
headers: { Authorization: `Bearer ${process.env.AUTOSOCIALS_API_KEY}` },
});
const result = await response.json();
if (!response.ok) throw new Error(result.error?.message ?? "Request failed");
console.log(result.data.channels);Python
import os
import requests
response = requests.get("https://autosocials.com/api/v1/channels", headers={"Authorization": f"Bearer {os.environ['AUTOSOCIALS_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json()["data"]["channels"])