Developer settings

3 min read

Personal keys, app clients, and connecting an agent or the CLI: the controls of the Sofia API page, and which one to choose.

This section is the entry point for everything programmatic. The reference documentation lives in the API, Agents and Add Sofia to your app tabs; this page describes the interface controls. Open the settings, “Sofia API” section.

On this pageAccessApp clientsAPI key or OAuth app?Where to go next

Access

The page has two tabs: “Personal access” and “App clients”.

Your personal key

  • Create the key. “New key”: give it a name if you like, an expiry (7 days, 30 days, 90 days, 1 year or no expiry) and its permissions. All are ticked by default; keep only what your tool needs.
  • Copy it right away. It is shown only once, and Sofia keeps only its fingerprint.
  • Use it. Send it in the Authorization: Bearer header of each call. A key acts on all your establishments, with your rights.

Connecting an AI assistant

For Claude, ChatGPT, Cursor, Gemini CLI or Claude Code, the connector in connected apps is often simpler: it needs no key. See The AI connector.

CLI and agents

“Copy agent instructions” gives the text to paste into your agent so it uses the API. The sofia command, published on npm as sofia-post, wraps the API to publish from a terminal, a script or a scheduled task; its installation is in the “Agents” tab.

App clients

An app client is for building something that other Sofia users will authorize, rather than something that acts as you.

  • Create the client. “New client”: a name, a logo of at least 180 × 180 pixels, the address of your privacy policy, one to five HTTPS redirect URLs, and the permissions the app may request. The name and logo are shown to people during authorization.
  • Copy the credentials. You get a Client ID and a Client Secret. A public client, for an app whose code is public, has no secret and authenticates with PKCE; this choice is permanent.
  • Implement the flow. See the “Add Sofia to your app” tab.

API key or OAuth app?

CriterionPersonal keyApp client
Acts asYouThe person who authorizes it
Suited forYour own scripts and automationsA product that other Sofia users will use
SetupCopy the keyDeclare a client and implement the flow
To revoke“Revoke” the keyThe person removes access in “Connected apps”, or you delete the client

If you automate your own publishing, use the key. Only build a client when other people’s accounts are involved.

Where to go next

  • API: endpoints, payloads and per-network settings, in the API tab.
  • CLI: publish from a terminal, in the Agents tab.
  • AI connector: plug in Claude, Cursor or ChatGPT, see The AI connector.