# 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). 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**

```sh
sinch auth login [options]
```

**Options**

| Option | Description |
|  --- | --- |
| `-f, --credentials-file <path>` | Load credentials from a JSON file instead of prompting |


**Credentials file format**

```json
{
  "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**

```sh
$ 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, whether the OAuth token is valid, and Terms of Service acceptance status.

```sh
sinch auth status
```

## sinch auth logout

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

```sh
sinch auth logout
```