OAuth & tokens
How a client finds the authorization server, and what a read or readwrite grant may do.
OAuth discovery
A client discovers how to authenticate from the server itself. Every step below is a document or a challenge it can read.
- An unauthenticated call to
https://mcp.jomform.com/mcpis refused with401andWWW-Authenticate: Bearer resource_metadata="…". - That header names the protected-resource metadata URL.
- The client fetches
/.well-known/oauth-protected-resource, defined by RFC 9728. - The document names the resource, the authorization server, the scopes and the token header.
- It then fetches
/.well-known/oauth-authorization-server, RFC 8414, for the authorize, token, revoke and registration endpoints. - It registers itself dynamically and opens the authorize URL in the browser, where you sign in and grant access.
- It exchanges the code for an access token, sending the
resourceparameter on both requests. - JomForm rejects a
resourcethat is not this MCP endpoint, and issues no token. - Every later call to
/mcpcarries the token as a Bearer credential.
The resource is https://mcp.jomform.com/mcp. The authorization server is https://mcp.jomform.com, and the scopes are read and readwrite.
OAuth connector scopes
A connector's grant carries one of two scopes. The MCP client asks for the one it wants on the authorize request.
The request carries ?scope=…, space-delimited. JomForm grants exactly what was asked for and records it on the token.
Both scopes are advertised in the protected-resource and authorization-server metadata, beside the other fields a client needs.
read: read-only. Every listing and getter works. Every tool that creates, updates, deletes, archives, cancels, refunds or generates a stored key is refused with a scope error.- A
readgrant cannot upgrade itself.create_api_keyis a write, so a read-only connector can never mint a wider credential. readwrite: read and write. A request that omitsscopedefaults to readwrite, so an existing client is never silently downgraded.
The scope is fixed for the life of the connection. Refreshing an access token returns the same grant, so a read grant never widens.
A request that names a scope the server does not advertise is refused with invalid_scope.
It is never silently widened to readwrite, or narrowed to read.
The token response echoes the issued grant, not the advertised list, so a client can read back what it holds.
Headless onboarding (no browser)
An AI harness with no browser can connect without one. JomForm implements the device authorization grant, RFC 8628, and advertises it in the authorization-server metadata.
- The harness posts
client_id, plus optionalscopeandlogin_hint(your account email), to/oauth/device_authorization. - It receives a
device_code, a shortuser_code, averification_uri,expires_inof 600 seconds andintervalof 5 seconds. - JomForm emails the
user_codeto the address on the account. That email is the consent screen. - The email names the client, the access in plain words, the address and city, the time and the code.
- You approve or deny from the link, or by entering the code on Profile → MCP → Connected apps.
- The approval screen offers both access levels, preselected to the one the harness asked for.
- The next poll returns an access token and a refresh token.
The device request starts at read: a harness that omits scope asks for read-only, and write access has to be named in the request.
It gets what you choose. The screen shows Look only and Look and change, with the requested level preselected.
A harness that asked for read-only can be given write access here, so it never needs reconnecting. The reverse also works.
The token it collects carries exactly the level you picked, and so does the connection listed under Connected apps.
Both secrets are stored hashed. The email goes only to the account's registered address.
The response is identical whether or not an address has an account, so it cannot be used to discover who is registered.
Polling and limits
The harness polls /oauth/token with the device grant type until you decide.
authorization_pending: you have not approved or denied yet.slow_down: the harness polled faster thaninterval. The interval grows by five seconds.access_denied: you refused. The harness must stop.expired_token: ten minutes passed. Start again.
An approved device_code is single-use. A second exchange is refused.
Every refusal that is about a code the harness holds also carries state, usable, remaining_seconds and available_events.
state is pending, approved, denied, used or expired, so a harness can tell "wait" from "start again" without parsing English.
An unknown device_code, or one presented by the wrong client, stays a bare invalid_grant: there is no code to describe.
Three authorisations an hour are allowed per account and per address. Beyond that the request is refused rather than mailed.
Platform-admin accounts cannot use this flow. An emailed code must not be the only thing before a platform-admin token.
Changing a scope
A grant never widens on refresh. Refreshing returns the same scope, and a scope parameter on a refresh request is ignored.
A wider grant is always a new grant. The old credential stops working in the same action.
- Profile → MCP → Connected apps. You are already signed in, so one confirmation is enough. Copy the new credential from the page.
- A new device authorisation from the harness. The email is the consent screen again.
- The browser authorize flow with the higher scope.
Narrowing a grant needs no confirmation, takes effect immediately, and also rotates the credential.
Every change records an audit event with both scopes and the route used.
Over MCP, list_connected_apps, revoke_connected_app and set_connected_app_scope expose the same surface. The last one can only lower a grant.
API-key scopes
An API key carries a scope, which says what that credential may do at all.
readonly: read tools only. Every read works.- Every tool that creates, updates, deletes, archives, cancels, revokes or generates a stored key is refused with a scope error.
- A readonly key cannot mint another key, so it cannot escalate itself to readwrite.
readwrite: read and write. It is the default grant for an OAuth connector unless the client asks forread.admin: kept for existing keys. It satisfies every scope, so it behaves as readwrite.
Scope is a separate axis from your workspace role: read_only, manage or admin.
A write has to satisfy both. A readwrite key held by a read_only member is still refused, and so is a readonly key held by the owner.
Reading never requires the write scope.
One tool looks wider than it is. get_webhook_signing_key needs readwrite only when it must create the account's keypair on first use.
Reading an existing key does not.