# OAuth

> An authorization standard that lets a user grant an app limited access to a service by signing in, without sharing a password or long-lived key.

OAuth is the framework behind most "Sign in and allow access" screens. Instead of pasting a password or an API key into a third-party app, the user is sent to the service, signs in there and approves a specific set of permissions. The service then gives the app an access token that works only for those permissions and usually expires after a short time.

The key idea is delegation. The app never sees the user's credentials, the user can see exactly what was granted, and access can be revoked without changing anything else. Refresh tokens let the app get new access tokens without asking the user to sign in again every hour.

OAuth 2.1 is an in-progress update that folds years of OAuth 2.0 security practice into one simpler core. It requires PKCE for the authorization code flow, requires exact redirect URI matching, and drops the implicit and password grants. For AI assistants connecting to remote tools, OAuth means a user can connect a service with a click instead of handling secrets.

## How Dizo handles it
The Dizo MCP server at `https://mcp.dizo.ai/mcp` supports OAuth 2.1, so clients that support it send you to sign in instead of asking for a key. In Claude Desktop and claude.ai, add it under Customize → Connectors → Add custom connector. Other clients can pass `Authorization: Bearer dz_live_...`. MCP connections default to `data:read` and a 500-credit per-call limit.

Docs: [/docs/me](https://dizo.ai/docs/me.md), [/docs/keys](https://dizo.ai/docs/keys.md), [/docs/billing-limits](https://dizo.ai/docs/billing-limits.md)

Related terms: [API key](https://dizo.ai/glossary/api-key.md), [MCP (Model Context Protocol)](https://dizo.ai/glossary/mcp-model-context-protocol.md), [AI agent](https://dizo.ai/glossary/ai-agent.md), [Tool calling](https://dizo.ai/glossary/tool-calling.md)


## What OAuth is

OAuth is an open standard for delegated authorization. It lets a user give one application limited access to their account on another service, without handing over a password or a long-lived secret. If you have ever clicked a button that sent you to another site, asked you to sign in, showed a list of permissions and then returned you to the original app, you have used OAuth.

Three parties are involved. The **user** owns the account. The **client** is the app that wants access, such as an AI assistant or a workflow tool. The **authorization server** belongs to the service holding the data, and it is the only place the user ever types their credentials. After the user approves, the authorization server issues the client a token, and the client presents that token to the service's API.

OAuth is about authorization, meaning what an app may do. It is often paired with sign-in standards that handle identity, but the core job is narrower: issue a token that carries a specific, revocable grant of access.

## OAuth 2.0 and OAuth 2.1

OAuth 2.0 has been the common version for many years, extended over time by separate documents covering security and new client types. OAuth 2.1 is an in-progress effort to consolidate those extensions and best practices into one simpler core specification. It is still a draft, but many newer systems already follow its rules.

The practical differences are mostly about removing risky options:

- **PKCE is required** for every client using the authorization code flow, which protects against intercepted codes.
- **Redirect URIs must match exactly**, closing tricks that relied on loose matching.
- **The implicit grant is removed**, so tokens are no longer returned directly in a browser redirect.
- **The password grant is removed**, so apps cannot collect the user's password and trade it for a token.
- **Bearer tokens cannot be sent in URL query strings**, where they leak into logs.
- **Refresh tokens for public clients** must be rotated or bound to the client.

## Why OAuth matters for GTM teams and AI agents

GTM stacks connect many tools to each other: CRMs, sequencers, enrichment, analytics and now AI assistants. Each connection needs credentials. With API keys alone, those secrets get pasted into settings pages, shared in chat and forgotten in old integrations. OAuth replaces much of that with tokens the user grants through a consent screen and can revoke from one place.

For AI assistants, OAuth makes remote tools approachable. A salesperson adding a data provider to their assistant should not need to create a key, store it and paste it into a configuration file. With OAuth, they add a URL, sign in, approve and start asking questions. That is the experience modern connector screens are built around.

OAuth also narrows the blast radius. A token tied to specific permissions and a short lifetime is far less dangerous to lose than a key that never expires. For teams giving agents access to paid data, that difference matters. The [OAuth connectors](/features/oauth-connectors) page shows how this applies to Dizo.

## How the authorization code flow works

The authorization code flow with PKCE is the standard path for most clients. The client first creates a random secret called a code verifier and derives a code challenge from it. It then sends the user's browser to the authorization server with the challenge, the requested permissions and a redirect URI.

The user signs in and approves. The authorization server redirects back to the client with a short-lived authorization code. The client exchanges that code, together with the original code verifier, for an access token and often a refresh token. Because only the real client knows the verifier, an attacker who intercepts the code cannot use it.

From then on, the client sends the access token with each API request, usually in an `Authorization: Bearer` header. When the access token expires, the client uses the refresh token to get a new one, without asking the user to sign in again. If the user revokes access, both stop working.

## Common mistakes and misconceptions

A common misconception is that OAuth is a login system. It is primarily an authorization framework. Using an access token as proof of who the user is, without an identity layer built for that purpose, can lead to subtle security bugs.

Another mistake is requesting far more access than the client needs. Broad scopes make the consent screen alarming for users and turn a stolen token into a bigger problem. Ask for the minimum, and request more later only when a feature needs it.

A third mistake is treating OAuth as automatically safer than keys in every case. For a server-side job you fully control, a well-scoped API key in a secrets manager is simple and appropriate. OAuth shines when a person is connecting a client they did not build, which is exactly the situation with most AI assistants.

## How to evaluate OAuth support in a tool

When you connect a data provider to an assistant or workflow tool, check three things. First, does the client support OAuth for this kind of connection, or only pasted keys? Second, what permissions does the connection receive, and can you narrow them? Third, where do you revoke access, and does revocation take effect quickly?

Also check what limits apply to the connection beyond permissions. On a paid API, the question is not only what the token can read, but how much it can spend. A token with read access and no spending ceiling can still produce a large bill if an agent loops.

Finally, check the client's documentation for how it handles remote connections. Clients differ in which auth methods they support, so confirm the exact setup steps in each tool's own docs before rolling it out to a team.

## How OAuth works with Dizo

Dizo's [MCP server](/mcp) at `https://mcp.dizo.ai/mcp` runs over streamable HTTP and supports OAuth 2.1 or a bearer key. Clients that support OAuth send you to sign in and approve the connection, so no key is pasted anywhere. In Claude Desktop and claude.ai, the path is Customize → Connectors → Add custom connector, then enter the server URL. The [Claude integration](/integrations/claude) page walks through it.

Clients that do not support OAuth can pass `Authorization: Bearer dz_live_...` instead, using a key you create with its own scopes and caps. Either way, MCP connections default to the `data:read` scope and a 500-credit per-call limit unless you change them in the console. Billing is read-only by default, and the account owner can lock billing entirely.

For live access to Dizo, [sign up](/signup) with your email. Test keys starting with `dz_test_` return synthetic data and never spend credits.

## Worked example: connecting an assistant safely

A sales manager wants their assistant to research accounts with Dizo. They add the MCP server as a custom connector, sign in through the OAuth screen and approve. The connection arrives with `data:read` and a 500-credit per-call limit, so the assistant can search and look up contacts but cannot touch billing.

The first thing the assistant does is call `dizo_whoami` to learn its limits, then `dizo_count` to size the request for free. Asked to find heads of RevOps at 200 accounts with emails, it can call `dizo_quote` first. Suppose 180 people match and 150 have verified emails: the match costs 180 ÷ 25 = 7.2 credits and the emails 150 credits, about 157 credits in total, or roughly $3.93 at $0.025 per credit. That sits well inside the per-call limit.

If the manager later leaves the team, removing the connector or revoking access ends the assistant's reach without rotating any shared secret.

## Related concepts

An [API key](/glossary/api-key) is the main alternative to OAuth for server-side jobs and clients that do not support sign-in flows. The Model Context Protocol is the standard that lets assistants discover and call remote tools, and OAuth is how many of those connections authenticate.

Tool calling describes what the assistant does once connected: it chooses a tool, fills in typed arguments and reads the result. Spend caps and scoped permissions decide how far that tool calling can go.

## FAQ

### Is OAuth the same as single sign-on?
Not exactly. OAuth grants an app access to resources on your behalf. Single sign-on is about proving identity across apps, and it often uses identity standards built on top of OAuth. The two frequently appear together but solve different problems.

### Is OAuth 2.1 finished?
OAuth 2.1 is still an in-progress draft. It consolidates established OAuth 2.0 security practices, such as required PKCE and the removal of the implicit and password grants, into one core document.

### Is OAuth more secure than an API key?
For a person connecting a third-party client, usually yes: no secret is pasted, access is scoped and tokens expire. For a server job you control, a well-scoped key stored in a secrets manager is also a sound choice.

### Which clients can connect to Dizo with OAuth?
Clients that support OAuth for remote MCP servers, such as Claude Desktop and claude.ai through custom connectors. Other clients can use a bearer key. Check each client's own docs for its supported auth methods.

### What can an OAuth connection to Dizo do by default?
MCP connections default to the `data:read` scope and a 500-credit per-call limit. They cannot change billing unless you grant that explicitly, and the account owner can lock billing entirely.

### How do I revoke an assistant's access?
Remove the connector in the client or revoke the grant on the service side. With OAuth, that ends access without rotating a shared key that other integrations might depend on.
