Skip to content

sinch auth

Authenticate with the Sinch API and manage stored credentials.

sinch auth login

Authenticate with the Sinch API. Prompts for Project ID, Key ID and Key Secret, verifies them by obtaining an OAuth 2.0 access token, and stores credentials securely (key secrets in OS keychain, session tokens in local config).

That project key pair is all Voice v2 needs — login never asks for anything else. The legacy Voice v1 application key and secret are a separate pair, supplied only where a v1 API still requires them: -a, --app-key on a sinch voice v1 command, the SINCH_APPLICATION_KEY / SINCH_APPLICATION_SECRET environment variables, or sinch secrets for a deployed function's own environment.

After a successful login, the CLI offers to install the Sinch developer skills for AI assistants (Claude Code, Copilot, Cursor). The choices are This project only (.) for the current folder, Globally (all projects) and Skip. The project choice shows only when the current folder has a sinch.json. Skip is remembered (skipSkillsPrompt in ~/.sinch/config.json), so the offer does not come back. With --json, or without a terminal, the CLI never asks. The prompt is also skipped automatically when the skills are already present: a sinch-* directory under ~/.claude/skills/ or ~/.cursor/skills/, or, in a folder with a sinch.json, under its .agents/skills/ or .claude/skills/. So if you re-run sinch auth login and don't see the prompt, the skills are already installed or you picked Skip before, not an error. To install them any time, run sinch skills install.

Syntax

sinch auth login [options]

Options

OptionDescription
-f, --credentials-file <path>Load credentials from a JSON file instead of prompting
--jsonOutput result as JSON

With --json, --credentials-file is required, because the command never prompts. It prints { authenticated, projectId, keyId, storage } and never the key secret. storage is keychain or plaintext. A rejected key prints { error } and exits 101.

Credentials file format

{
  "projectId": "your-project-id",
  "keyId": "your-key-id",
  "keySecret": "your-key-secret"
}

All three fields are required. Any other key in the file is ignored — an older file still carrying applicationKey and applicationSecret logs in fine, but that pair is neither read nor stored.

Example

$ sinch auth login

Sinch API Authentication
Enter your Sinch API credentials (from the Sinch Dashboard)

Project ID (from Sinch Dashboard): abc123de-f456-...
Key ID (from Project > Access Keys): key_live_abcdef
Key Secret: ********

Verifying credentials...
Authentication successful!

sinch auth status

Show the current authentication state: which credentials are stored and whether the OAuth token is valid.

sinch auth status [--json]

--json prints { authenticated, projectId, keyId, source, storage, tokenValid }. storage is left out when the credentials come from environment variables. When there are no credentials it prints { "authenticated": false }.

Exit code change. When not authenticated, auth status now exits 101 (AUTH_FAILED), with and without --json. It used to exit 0. Scripts that ran it and ignored the result need to handle the non-zero exit. See the 0.7.0 entry in the changelog.

sinch auth logout

Remove all stored credentials (keychain secrets and local session tokens). Prompts for confirmation before clearing.

sinch auth logout [-f, --force] [--json]

-f, --force skips the prompt. --json prints { "cleared": true } and requires --force; without it the command fails with an error document naming --force and clears nothing.