The flow
- The app registers itself by dynamic client registration. It is a public client, with no client secret.
- It sends the person to xcale’s authorization endpoint with a PKCE challenge. Only
S256is accepted. - The person signs in to xcale and approves. Only an Admin of a business can approve, and the approval names the business.
- The app exchanges the code it gets, which lasts 60 seconds, for tokens.
offline_access; there is no scope for the person or the app to choose.
Tokens
- The access token lasts 15 minutes. The app renews it with its refresh token, which rotates on each use.
- Presenting a refresh token that was already replaced, once a short grace period has passed, ends the connection.
- A connection whose access nobody renewed for 30 days ends.
What the access token is, and is not
The access token is signed with a key of its own and is issued only for the xcale MCP. It carries no platform role. A dashboard session token is refused at the xcale MCP, and an xcale MCP token cannot open a dashboard route. On each call xcale checks the connection and the Admin’s membership again. A call without a valid token is answered with401, naming where the app reads how to get one. A connection whose budget of calls is spent is answered with 429 and a Retry-After header.