Authentication

Log in with an API key, use env vars for CI, and manage credential storage.

Global package: social0. Thin client over https://api.social0.app/v1.

API keys

Create a key (sk_live_…) in Dashboard → API keys. Keys must start with sk_live_… (legacy s0_live_… still works).

social0 login                    # masked prompt
echo "sk_live_..." | social0 login
social0 whoami                   # name, email, plan, API URL, masked key
social0 logout

whoami calls GET /v1/me and confirms the key works.

Environment variables (CI / headless)

Set SOCIAL0_API_KEY — the CLI uses it as-is and does not write it to disk:

export SOCIAL0_API_KEY=sk_live_...
social0 accounts --json
social0 publish -c "CI deploy" -p twitter
VariablePurposeDefault
SOCIAL0_API_KEYAPI key for CI / headless
SOCIAL0_API_URLAPI base URLhttps://api.social0.app/v1
SOCIAL0_CREDENTIAL_PASSPHRASEEncrypt local fallback credentials
SOCIAL0_REQUEST_TIMEOUT_MSRequest timeout30000
SOCIAL0_MAX_RETRIESRetries on HTTP 4293
SOCIAL0_VERBOSEVerbose logs (1 to enable)0

When both a stored key and SOCIAL0_API_KEY are set, env wins for that run.

Credential storage

MethodWhereNotes
OS keychainmacOS Keychain / Linux Secret Service / Windows Credential ManagerPreferred after social0 login
File fallback~/.social0/ (mode 0600)Used when keychain is unavailable
Env onlyNot storedSOCIAL0_API_KEY — ideal for CI

Config file: ~/.social0/config.json (non-secret settings like apiUrl, defaultTimezone).

Passphrase encryption

Optional AES encryption for the file fallback:

social0 login --require-passphrase
social0 login --skip-passphrase
social0 passphrase status
social0 passphrase set
social0 passphrase remove

Or set SOCIAL0_CREDENTIAL_PASSPHRASE before social0 login.

Custom API URL

Priority (highest first):

  1. --api-url <url> (per command)
  2. SOCIAL0_API_URL
  3. social0 config set apiUrl …
  4. Default https://api.social0.app/v1

The CLI appends /v1 if you omit it.

social0 --api-url https://api.social0.app accounts
export SOCIAL0_API_URL=https://api.social0.app/v1
social0 config set apiUrl https://api.social0.app/v1
social0 config get apiUrl

Verify auth

social0 doctor          # auth + API connectivity
social0 accounts        # connected platforms