Contents
At a glance
- Category
- Automation mechanics
- Specification
- RFC 6749 - the OAuth 2.0 authorization framework
- Grants
- A short-lived access token plus a refresh token, never your password
- Scopes
- The specific permissions granted - always request the narrowest that works
- Common break causes
- Authoriser left, password changed, refresh expired, admin revoked access
- Setup cost
- One click with a built-in connector; app registration and review without one
What OAuth is
OAuth 2.0, defined in RFC 6749, is the authorisation framework behind every "Connect your Google account" button. It lets you grant an application specific, revocable access to your data in another service without handing over your password. The application receives a short-lived access token and a longer-lived refresh token, and it never sees your credentials at all.
For automation this is the normal way to connect a platform to a serious business system. The alternative, an API key, is simpler but coarser: keys typically carry full account access and do not expire on their own.
How the flow works
The common authorization-code flow has five beats. Your automation platform redirects you to the service's login page. You authenticate there, on the service's own domain. The service shows you exactly what is being requested - the scopes - and you approve. It redirects back with a one-time code. The platform exchanges that code, server to server, for an access token and a refresh token.
From then on the platform sends the access token with each request. When it expires, typically within an hour, the platform quietly uses the refresh token to get a new one. That refresh step is the part that breaks, and when it does your automation stops with a 401 and no other explanation.
Scopes, expiry and the things that break it
Scopes are the permissions granted, and they are worth reading rather than clicking past. Ask for the narrowest set that does the job: read-only where you only read, one calendar rather than all calendars. Over-scoped connections are the ones that turn a compromised automation platform into a serious incident, and they are also the ones that fail a client's security review.
Connections break for a predictable set of reasons: the user who authorised it left and their account was disabled, the password was changed and the provider invalidated tokens, the refresh token expired through inactivity, an admin revoked third-party access, or the app's permissions changed and require re-consent. The practical mitigations are to authorise with a service account rather than an individual's personal login where the vendor allows it, and to alert on 401s specifically so you find out before your customers do.
Cost and operational reality
OAuth costs setup time. Where a platform has a built-in connector it is one click; where it does not, you register an application with the provider, configure redirect URLs, request scope approval, and in some cases go through a verification review that takes weeks. Budget for that when a project depends on an integration the platform does not natively support.
Store tokens like passwords. If you are handling them yourself rather than letting a platform manage them, they belong in a secret store, never in a workflow field, a spreadsheet or source control. A leaked refresh token is standing access to the account until someone revokes it.
What you should know
Document every OAuth connection your automations depend on: which service, which account authorised it, which scopes, and who to contact when it breaks. That list is unglamorous and it is the first thing anyone needs during an incident, during an offboarding, and during a client's security questionnaire.
Note also that OAuth is about authorisation, not identity - OpenID Connect is the layer built on top of it for signing users in. Conflating them is common and mostly harmless until someone asks precisely what your system does with a person's identity, which is a question that comes up in data processing reviews.
OAuth FAQ
What is OAuth in simple terms?
The mechanism behind 'Connect your Google account'. It lets an application act on your behalf in another service without ever seeing your password, using a short-lived access token that can be revoked at any time from the service's own settings.
What is the difference between OAuth and an API key?
An API key is a single secret string, usually with broad account access and no expiry. OAuth grants scoped, revocable, expiring access tied to a specific user's approval. Keys are quicker to set up; OAuth is safer and is what serious business systems require.
Why does my OAuth connection keep breaking?
Usually the refresh token stopped working: the person who authorised it left and their account was disabled, a password change invalidated tokens, the token expired through inactivity, or an admin revoked third-party access. Authorising with a service account avoids the most common cause.
What are OAuth scopes?
The specific permissions being granted - read your calendar, send email as you, manage your files. Request the narrowest set that does the job. Over-scoped connections turn a compromised platform into a serious incident and reliably fail client security reviews.
Should I authorise integrations with my personal account?
Preferably not. Use a dedicated service account where the vendor supports it, so the automation does not break when someone leaves and so the access is obviously the business's rather than an individual's. Document who authorised what either way.
How should OAuth tokens be stored?
Like passwords. If your platform manages them, that is handled for you. If you handle them yourself, use a secret store with restricted access - never a workflow field, a spreadsheet or version control. A leaked refresh token is standing account access until someone revokes it.
Primary source
RFC 6749 - The OAuth 2.0 Authorization Framework
Checked August 2026. Anything priced or rate-limited moves, so verify against the source before you budget.
Want this built rather than explained?
Knowing what oauth means is one thing; having it running in your business is another. We scope one workflow at a time, quote a fixed price in writing after a free consult, build it, and hand it over with documentation you own.
