Authenticate with the Sinch API and manage stored credentials.
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). This prompt is skipped automatically when the skills are already present — that is, when a sinch-* directory exists under ~/.claude/skills/ or ~/.cursor/skills/. So if you re-run sinch auth login and don't see the prompt, it's because the skills are already installed, not an error. To (re)install them manually, run npx skills add sinch/skills --all -g.
Syntax
sinch auth login [options]Options
| Option | Description |
|---|---|
-f, --credentials-file <path> | Load credentials from a JSON file instead of prompting |
--json | Output 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!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.
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.



