Get started

Glossary · AI and digital

OAuth (OAuth2)

OAuth is a standard for granting access between programmes: instead of telling an add-on programme your password, you confirm on the service’s own page which data it may use. The programme then receives a time-limited access token with exactly those rights, and you can revoke the approval at any time without changing your password.

Updated on 27 November 2026

A programme requests access, the person confirms on an approval page, and the programme then receives a time-limited access token

The problem OAuth solves

In the past, add-on programmes often asked for an account’s password in order to access its data. That gave them full access: they could read and change everything and kept the password until it was changed. If you wanted to withdraw access from a single programme, you had to change the password for all the others as well.

OAuth separates these things. The password or the passkey is only used on the service’s own page. The add-on programme instead receives a token that has only certain rights, expires after a short time and can be revoked individually. OAuth therefore governs permission (authorisation), not the question of who someone is. For identity there are methods built on top of it, such as OpenID Connect, which is behind many “Sign in with …” buttons.

How an OAuth approval works

  1. Request

    The programme that wants access redirects you to the service’s approval page and states the rights it wants.

  2. Sign in to the service

    You sign in on the service’s genuine page, not in the third-party programme.

  3. Confirm the approval

    The service shows which programme wants which rights. You agree or decline.

  4. One-time code

    After you agree, the programme receives a short-lived code that it exchanges for a token. With PKCE, it proves in the process that it is the same programme that made the request.

  5. Access with the token

    With the token, the programme calls the service’s API, but only within the approved scope.

  6. Renew or revoke

    When the token expires, the programme uses a refresh token to get a new one. If you revoke the approval, neither works any more.

The key terms around OAuth

TermMeaning
ClientThe programme that wants access, for example an AI assistant or a reporting tool
Resource ownerThe person who owns the data and gives consent
Authorisation serverThe part of the service that handles the approval and issues tokens
ScopeThe extent of the rights, such as “read contacts”
Access tokenShort-lived key for the API calls
Refresh tokenLonger-lived key for getting a new access token, ideally replaced each time it is used
PKCEExtra protection so that an intercepted one-time code is worthless to third parties

OAuth 2.1 brings together the experience of more than ten years of OAuth 2.0. Insecure variants are dropped, PKCE is mandatory for all programmes, and refresh tokens should change every time they are used. In practice, this means that anyone building an OAuth connection today follows these stricter rules.

OAuth or API key?

Both routes give a programme access to an API, but they suit different situations. An API key belongs to a fixed connection that a business sets up itself, for example between its website and its CRM. OAuth fits when a person gives a third-party programme access on their behalf and is meant to manage that access themselves.

API keyOAuth
Who sets it up?Administrator in the programmeThe person themselves, by giving consent
On whose behalf?On behalf of the business or a connectionOn behalf of the person who consented
ValidityUntil the expiry date or deletionShort-lived tokens that are renewed
Typical useWeb form, in-house reportingAI assistant, third-party app
RevokingDelete the keyRemove the approval in the settings

In practice, many businesses use both side by side. The same principle matters for both routes: as few rights as possible, an overview of all active connections and consistently removing access nobody needs any more.

OAuth and AI assistants

AI assistants have given OAuth a new job. Through the Model Context Protocol (MCP), assistants such as Claude or ChatGPT can access business software, for example to search for contacts or create a note. To keep this under control, the person approves access via OAuth. The assistant never gets the password, only a token with clear rights, and the approval can be withdrawn in the business software at any time. For an AI agent that carries out several steps on its own, this limitation is particularly important.

  • Before agreeing, check which programme is asking for which rights.
  • Only approve the rights needed for the task.
  • Regularly revoke approvals that are no longer used.
  • Always open the approval page via the service’s genuine address.

A practical example

Example: a consultant in St. Gallen connects her AI assistant

The fictitious consultant Anna Muster runs a small consultancy in St. Gallen and works with an AI assistant every day. She wants to be able to ask it which quotes (Offerten) are open this week without copying the data in by hand each time.

In the assistant, she adds the MCP address of her CRM. She is redirected to the CRM’s sign-in page, signs in with her passkey and sees which rights the assistant will receive. She confirms. From now on, the assistant answers her questions with up-to-date data. When she switches to a different assistant, she revokes the old approval in the CRM with one click.

Invented example for illustration.

How VoxCRM helps

yes

VoxCRM uses OAuth to connect AI assistants such as Claude or ChatGPT via MCP. You sign in to VoxCRM itself and confirm what the assistant may do; your sign-in details never go to the assistant, and you can disconnect connected apps at any time. The address for the connection is https://app.voxcrm.ch/api/mcp. More under integrations and API.

FAQ

Frequently asked questions

Can’t find your question? Write to us at hello@voxcrm.ch.

Is OAuth the same as “Sign in with Google”?

Not quite. Sign-in buttons usually use OpenID Connect, which builds on OAuth and also confirms identity. OAuth itself only governs which rights a programme receives on your behalf. Both use the same flow with redirect, consent and token, however, which is why they look similar to users.

How do I revoke an OAuth approval?

In the settings of the service that holds the data. There is usually a list of connected programmes there, with the option to remove individual approvals. After that, their tokens no longer work. Your password or passkey stays unchanged, and other connections keep running.

Can a programme do more with OAuth than it is allowed to?

Not if the service checks the rights properly. The token only contains the approved scopes, and every call is measured against them. So when giving consent, pay attention to which rights are requested. If a programme asks for more than its task needs, caution is called for.

Sources and date

Sources

  1. Schutzmassnahmen umsetzen (opens in a new window), Federal Office for Cybersecurity (NCSC). Version: Online edition, retrieved on 3 November 2026, retrieved on 3 November 2026.
  2. RFC 6749: The OAuth 2.0 Authorization Framework (opens in a new window), Internet Engineering Task Force (IETF). Version: RFC 6749, October 2012, retrieved on 3 November 2026.

Last updated:

Free handbook as a PDF

The VoxCRM Handbook for SMEs

Everything VoxCRM can do at a glance, plus exactly the areas you are interested in, in depth. Compiled for you and sent by email straight away.

  • Product, workflow, security and prices
  • Your modules with real screenshots from the app
  • With an industry part for trades, services, hospitality and retail
Free, no account needed
Cover of the VoxCRM Handbook for SMEs as a book

Try it free for 14 days.

Every feature, 60 minutes of Vox, no credit card. Then you choose a plan. Without a plan the account is paused, and you can export your data until it is deleted on day 60.

Go to the plan finder: which plan fits and what it costsBook a demoDemo