Authentication

Authentication

ThreadzSocial uses Bearer authentication with API keys or Login with ThreadzSocial OAuth access tokens. Public read endpoints work without a credential; protected and write routes require a valid key or token.

Multi-tenant apps

To act on behalf of each seller’s own account, use OAuth (Login with ThreadzSocial). API keys always act as the developer who created the key.

API keys

DetailValue
Formatstz_{live|sandbox}_{12hex}_{48hex}
Lookup prefixstz_{env}_{12hex} (unique)
StorageSHA-256 of optional pepper + raw key. Full secret shown once at create.
Default scopes["read", "listings:write"]
Create / revokePer app on /developers/apps
Legacy path/account/developer redirects to apps

Live vs sandbox keys

Key environmentPrefixBehavior
Sandboxstz_sandbox_…Writes and owner reads for sandbox listings only. Safe for integration tests. Never hits public Discover.
Live (production)stz_live_…Operates on the real marketplace. Requires go-live milestones / app production status. Treat as high sensitivity.

Choose sandbox while building

Create a sandbox key first. Complete milestones, then unlock production. See Go live and Sandbox.

Sending credentials

Pass the full secret in the Authorization header using the Bearer scheme:

Header
Authorization: Bearer stz_sandbox_a1b2c3d4e5f6_…
curl
curl -sS \
  -H "Authorization: Bearer stz_sandbox_YOUR_FULL_KEY" \
  https://www.threadzsocial.com/api/v1/me

Common headers

HeaderWhenNotes
AuthorizationProtected & write routesBearer <api_key>
Content-TypePOST / PATCH JSON bodiesapplication/json
Idempotency-KeyRecommended on POST /listingsMaps to listing external_id (max 128 chars). Safe retries for the same seller + environment. See Listings.

When a key is required

ModeWhen
None (anonymous)Public GET health, listings (live feed), profiles
API keyGET /me, listing writes, sandbox inventory listing

Auth outcomes

SituationHTTPCode
No Authorization on public GET200
Valid Bearer200
Missing key on protected route401unauthorized
Invalid / revoked / expired key401unauthorized
Valid key, missing scope403forbidden
Key presented but server cannot validate503service_unavailable
Rate limit exceeded429rate_limited

Scopes

Keys carry a list of scopes. New keys default to read and listings:write. Scope * or admin (if ever issued) grants all permissions.

  • GET /me → requires read
  • POST / PATCH / DELETE listings → requires listings:write

Lifecycle best practices

  • Name keys by environment and purpose (e.g. “CI sandbox”).
  • One key per service; rotate by creating a new key then revoking the old.
  • Never commit keys. Use environment variables or a secret manager.
  • Revoke immediately if leaked from your app dashboard.

Login with ThreadzSocial (partners)

Building a product for many independent sellers? Prefer Login with ThreadzSocial (OAuth): each user authorizes only their own closet, then your app calls /api/v1/me and listings with their access token. API keys remain the right fit for single-seller scripts and your own automation.

Agree to the terms

API use is covered by the API Terms of Use and platform Terms of Service.