Skip to main content
@social-media-scheduler/sdk is the server-side TypeScript SDK for platforms that want to offer social account connection and post scheduling to their own customers. Social media studio hosts the OAuth flow and publishing infrastructure while your application keeps ownership of its customer experience.
Partner keys can access every end user in their project. Use the SDK only in trusted server code. Never include a pk_test_ or pk_live_ key in browser, mobile, desktop, or other customer-distributed code.
The Embedded Platform is currently in limited availability, and hosted account connection currently supports Threads. Contact Social media studio to have a partner project and API key provisioned.

SDK versus CLI

The packages are independent. Installing the SDK does not install the so-me command, and the CLI does not expose the partner SDK.

Requirements

  • Node.js 20 or newer
  • A Social media studio partner project
  • A test or live partner API key
  • Every application origin that may receive an OAuth return, registered on the partner project

Install

The SDK ships ESM and CommonJS builds, includes TypeScript declarations, and has no runtime dependencies.

Initialize the client

The production API URL defaults to https://api.so-me.studio. You can provide baseUrl for a self-hosted or local environment and customize the 30-second request timeout:

End-to-end flow

  1. Upsert an end user using the stable customer ID from your database.
  2. Create a short-lived connect session and send its connectUrl to the customer’s browser.
  3. After OAuth completes, retrieve the session or list the customer’s social connections.
  4. Create an immediate or scheduled post using a returned connection ID.
  5. Receive publishing results through signed webhooks.

Connect accounts

Create end users and run the hosted OAuth flow.

Publish posts

Publish immediately, schedule posts, and upload media.

Receive webhooks

Verify signed delivery payloads and handle retries safely.

Secure the integration

Protect partner keys and handle API failures.