OAuth 2.1

OAuth 2.1 — Overview

How OAuth enables third-party applications to act on behalf of merchants in Whatalo.

OAuth 2.1 is the correct mechanism when your application needs to access the Whatalo API on behalf of a merchant. Unlike an API Key that identifies a single integration, an OAuth token is bound to a user who authorized your app and to the specific store they chose at the moment of consent.

When to use OAuth vs. API Keys

CriteriaAPI KeyOAuth 2.1
Who authorized accessThe merchant themselves, manuallyThe merchant via a consent flow
Bound toOne store (manual setup)The store the user selects during authorization
Multi-tenant supportNo (one key per store)Yes (one app for many stores)
Delegated accessNoYes
Best forInternal scripts, server-to-serverThird-party apps, MCP clients, SaaS integrations
RevocationManual from dashboardBy the user from settings, on token expiry, or for DCR clients on client expiry (default 90 days)

High-level flow

Your app                     Whatalo AS                  Merchant's store
   │                              │                               │
   │── POST /oauth/register ─────►│                               │
   │◄── client_id ───────────────│                               │
   │                              │                               │
   │── GET /oauth/authorize ─────►│                               │
   │                              │◄── user selects store ────────│
   │◄── ?code=AUTH_CODE ─────────│                               │
   │                              │                               │
   │── POST /oauth/token ────────►│                               │
   │◄── access_token + refresh ──│                               │
   │                              │                               │
   │── Authorization: Bearer ────►│ (API v1)                      │

RFC standards compliance

Whatalo implements the following standards as an Authorization Server:

RFCNameSupport
OAuth 2.1 (draft)Updated base frameworkFull
RFC 7591Dynamic Client RegistrationFull
RFC 7662Token IntrospectionFull
RFC 7009Token RevocationFull
RFC 8414Authorization Server MetadataFull
RFC 8707Resource IndicatorsPartial — single-value policy
RFC 6749 §4.1Authorization Code FlowFull (mandatory PKCE)

Authorization Server base URL

https://app.whatalo.com

All OAuth endpoints are served from this base. Never hardcode endpoint URLs — use the Discovery endpoint to resolve them at runtime.

access_token format

Whatalo issues opaque tokens (not JWT). This architectural decision directly affects how your Resource Server validates tokens:

  • The access_token is a 32-byte random string encoded in base64url. It contains no client-side decodable information.
  • It is not signed with public keys, so the Discovery endpoint does not expose jwks_uri.
  • To validate a token, your Resource Server must call the Introspection endpoint on each request (with optional caching, TTL ≤ 60 s).

Implications for your Resource Server

TopicOpaque tokens (Whatalo)Signed JWT tokens
ValidationRound-trip to /oauth/introspectLocal verification with JWKS
Added latency~50–100 ms (mitigable with caching)Zero
Instant revocationYes — effective when cache expiresDifficult — requires a denylist
Token privacyZero exposed metadataClaims visible if decoded

This is a deliberate decision. Opaque tokens enable immediate revocation when a merchant revokes an app's access from their settings — all active tokens are invalidated instantly. With signed JWTs, this use case would require an additional distributed denylist.

Cache active: true Introspection responses with a TTL of at most 60 seconds per token. Do not cache active: false responses — a token can be revoked at any time by the user, and aggressive caching would delay effective revocation.

Reference pages

PageDescription
DiscoveryAuthorization Server metadata (RFC 8414)
Client registrationDynamic registration of your app (RFC 7591)
Authorization flowAuthorization Code + PKCE step by step
Token endpointCode exchange and token renewal
IntrospectionBearer token validation (RFC 7662)
RevocationRevoke active tokens (RFC 7009)
ScopesComplete table of the 15 available scopes
OAuth errorsError codes and how to handle them

On this page