---
title: "Authenticating to Scriptivox"
description: "Which credential an agent should use, how to obtain it, and how to hand it back."
canonical: "https://www.scriptivox.com/auth.md"
last-updated: "2026-09-29"
---

# Authenticating to Scriptivox

> Two credentials exist, for two different jobs. Pick by whether a human is
> present to approve access.

## Discover

Start from any protected endpoint and let the `401` tell you where to go.

1. Call it with no credential. The response carries
   `WWW-Authenticate: Bearer resource_metadata="..."`.
2. Fetch that URL — [https://www.scriptivox.com/.well-known/oauth-protected-resource](https://www.scriptivox.com/.well-known/oauth-protected-resource) — for RFC 9728 protected-resource
   metadata. Read `authorization_servers[0]`.
   It is Scriptivox itself, on the same origin (e.g. `https://platform.scriptivox.com`).
3. Fetch its RFC 8414 metadata at [https://www.scriptivox.com/.well-known/oauth-authorization-server](https://www.scriptivox.com/.well-known/oauth-authorization-server) for the
   `authorization_endpoint`, `token_endpoint`, `registration_endpoint` and
   `revocation_endpoint`.

Both documents carry an `agent_auth` block naming `identity_types_supported`,
a `register_uri` and a `revocation_uri` — see [Register](#register).

## Pick a method

| | Use when | Section |
|---|---|---|
| **API key** | You are a script or a server the account owner controls. | [below](#1-api-key--for-a-script-or-a-server-you-control) |
| **OAuth 2.1** | You act on somebody else’s behalf and must not hold their key. | [below](#2-oauth-21--for-an-agent-acting-on-somebody-elses-behalf) |

If a human can paste a secret into your configuration once, use an API key —
it is one header and no redirects. If you are an MCP client, an assistant, or
anything a stranger will point at their own account, use OAuth.

## 1. API key — for a script or a server you control

A long-lived secret in the form `sk_live_...`, created by a signed-in user at
[https://platform.scriptivox.com/keys](https://platform.scriptivox.com/keys). Send it on every request as either:

```
Authorization: sk_live_...      (a Bearer prefix is also accepted)
X-Api-Key: sk_live_...
```

Base URL is `https://api.scriptivox.com/v1`. Full reference:
[https://platform.scriptivox.com/docs/authentication](https://platform.scriptivox.com/docs/authentication).
There is a ceiling of 5 keys per account. A key carries the full rights of the
account that owns it, so treat one as you would a password.

## 2. OAuth 2.1 — for an agent acting on somebody else’s behalf

Use this when you are an MCP client, an assistant, or any third-party app that
must not hold a user’s API key. The user approves once, in a browser, and you
receive a token scoped to their account.

Scriptivox is both the resource server and the **authorization server** for
MCP. Tokens are opaque and work only at the MCP server: they are not
Supabase or web-app sessions, cannot change account settings, and cannot be
used against any other Scriptivox API. Follow [Discover](#discover) rather
than hard-coding URLs.

## Register

**Dynamic client registration is on** (RFC 7591). POST your client metadata
to the `registration_endpoint` (also the `register_uri` in `agent_auth`):

```json
{
  "client_name": "Your app",
  "redirect_uris": ["http://localhost:53682/callback"],
  "token_endpoint_auth_method": "none",
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"]
}
```

You get a `client_id` back. Native and CLI clients may use a loopback
redirect (`http://localhost:<port>/...` or `http://127.0.0.1:<port>/...`).
MCP clients such as Claude Code, Codex, Cursor and Claude.ai do all of this
automatically: add `https://platform.scriptivox.com/mcp` as a remote server
and they register, open a browser, and finish on their own.

Registering grants nothing by itself. No client gets a token until a person
approves it on the consent screen, which shows your registered name and the
host your redirect URI points at, and warns when either looks wrong.

Prefer a client_id issued by hand? Email [support@scriptivox.com](mailto:support@scriptivox.com)
with your client name and redirect URIs.

## Claim

Once you hold a `client_id`, run the authorization code flow **with PKCE** —
the only flow supported.

1. Send the person to the `authorization_endpoint` with `response_type=code`,
   your `client_id`, your redirect URI, the scopes you need, and an S256
   `code_challenge`.
2. They land on the Scriptivox consent screen, see your registered name and
   the host your redirect URI points at, and approve or decline. Nothing is
   auto-approved.
3. Exchange the returned code at the `token_endpoint` with your
   `code_verifier`.

The `agent_auth` block advertises `identity_types_supported:
["identity_assertion"]`. There is **no `anonymous` type** — every token is
bound to a real, confirmed account. Inside `identity_assertion`,
`assertion_types_supported` names `urn:ietf:params:oauth:token-type:id-jag`
and `verified_email`.

## Use the credential

Send the access token as `Authorization: Bearer <token>`. Access tokens
(`svx_at_…`) are opaque and last one hour. Refresh tokens (`svx_rt_…`) rotate
on every use; an old one keeps working only until its replacement is first
used, and replaying one after that ends every token of the connection.

### Scopes

There is one scope, `mcp`. What a connection may do is decided by the
account owner on the platform keys page — the AI-apps switch, and approval
before an app spends money or changes API keys — not by scope strings.
Send `resource` (the MCP server URL) with the authorization and token
requests; any other audience is refused with `invalid_target`.

### What a token can do on the MCP server

An OAuth token sent to the hosted MCP server (`https://platform.scriptivox.com/mcp`)
can use every tool, including transcription. Transcription bills the account’s
prepaid **API balance** ($0.20 per hour of audio), never a web subscription.
Each signed-in connection is listed as a key on
[https://platform.scriptivox.com/keys](https://platform.scriptivox.com/keys) — named after your client, e.g.
“Claude Code (MCP)” — and revoking it there disconnects that client at once.

The public REST API (`https://api.scriptivox.com/v1`) still takes API keys
only. No OAuth token can start a transcription on the web app’s own plan, at
any scope.

## Errors

Every failure is `{"error": {"code": "...", "message": "..."}}` with a stable
machine-readable `code`. A `401` always carries `WWW-Authenticate`, which is
what makes [Discover](#discover) work from any endpoint. A `403` means the
credential was understood but is not allowed to do that. A `429` carries
`RateLimit-Policy` and `Retry-After`.

## Revocation

Stop using a credential the moment it is no longer needed — neither kind
expires on its own.

- **OAuth token.** POST it to the `revocation_uri` in the `agent_auth` block
  (`revocation_endpoint` in the metadata), per RFC 7009. Revoking a refresh token ends
  the grant; the person can also revoke your client from their connections
  page at any time, without telling you.
- **API key.** Delete it at [https://platform.scriptivox.com/keys](https://platform.scriptivox.com/keys).
  Deletion takes effect immediately; there is no grace period and no way to
  recover the secret afterwards.

- **MCP connection.** Revoke its key on
  [https://platform.scriptivox.com/keys](https://platform.scriptivox.com/keys), or disconnect the app on the
  connections page. Either one ends the other too.

A revoked credential answers `401` with the same `WWW-Authenticate` challenge
as a missing one, so a long-running agent can simply re-enter
[Discover](#discover) rather than treating it as fatal.

## Related

- [https://www.scriptivox.com/.well-known/oauth-protected-resource](https://www.scriptivox.com/.well-known/oauth-protected-resource) — RFC 9728 metadata
- [https://www.scriptivox.com/.well-known/oauth-authorization-server](https://www.scriptivox.com/.well-known/oauth-authorization-server) — RFC 8414 mirror, with the `agent_auth` block
- [https://platform.scriptivox.com/docs/authentication](https://platform.scriptivox.com/docs/authentication) — API key reference
- [https://www.scriptivox.com/signup.md](https://www.scriptivox.com/signup.md) — creating the account in the first place
- [https://platform.scriptivox.com/.well-known/mcp](https://platform.scriptivox.com/.well-known/mcp) — MCP server manifest

## Support

Email **support@scriptivox.com**, or use the chat on https://www.scriptivox.com. Any feedback or issue sent to support@scriptivox.com, or through any other channel, is resolved within 24 hours. This is our founders' personal guarantee. ([Meet the founders](https://www.scriptivox.com/founders))

So we can find the issue, include:

- the email address of the Scriptivox account
- the job or transcription id (the `id` returned by `POST /v1/transcribe`, or the transcript's link in the web app)
- when it happened, with the time zone
- what was done, what was expected, and the exact error code and message

Never include an API key, a password or a sign-in code.
