Update authentication and rate limit documentation - #250
Draft
ricardobcl wants to merge 3 commits into
Draft
Conversation
Corrects the authentication section to match the current API behavior: the token response shape (expires_in is omitted for non-expiring tokens, token_type included), redirect_uri parameter and exact-match semantics, multiple redirect URI support, OAuth error responses, PAT creation authentication (requires an existing access token, not email/password), PAT revocation semantics, the restricted availability of email/password basic authentication, and the two-factor authentication headers (OTP-Token, OTP-Method-Id). Adds the request challenge endpoint to the One-Time Password section and the transactions:commit:otp scope.
Updates the global rate limit to the current 500 requests per 5-minute window, removes the POST /password/reset row (no such limiter exists), adds the authentication method challenge and email-destination transaction limiters, and documents the too_many_requests error code.
ricardobcl
force-pushed
the
support/update-authentication-documentation
branch
from
August 23, 2026 21:16
8d28189 to
7f42c93
Compare
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Refreshes the authentication-related documentation to match the current behavior of the API, verified against the
uphold/backendmaster branch. All corrections below were traced to the implementation._authentication.mdexpires_inis omitted for non-expiring tokens (nevernull), andtoken_type: "bearer"is always present. Added notes on whenexpires_inandrefresh_tokenappear, and documented that tokens issued through the web flow are always scoped (the sample now includes thescopefield).redirect_uriauthorize parameter: optional, exact match against a registered redirect URL, falls back to the first registered one when omitted.invalid_grant.-u <email>:<password>, which returns a 401 — the endpoint requires an existing access token that is not limited to specific permissions (scoped Connect tokens are rejected). Also documented the 1–255 characterdescriptionconstraint, that theaccessTokenis only shown once, and that business accounts cannot create PATs.:tokenis the access token value (not theid), and documented the 204/404 responses.-u <token>:x-oauth-basicBasic transport alongsideBearer.GET /me/authentication_methods,POST /me/authentication_methods/:id/request_challenge,GET /me/phones); everywhere else it returns 401.OTP-Token: requiredresponse header (lowercase — the docs previously saidRequired), and theOTP-Token/OTP-Method-Idrequest headers (OTP-Method-Idis only taken into account when the user has no default authentication method)._applications.mdhttpsor a custom scheme that does not collide with a known URI scheme;httpis rejected).transactions:commit:otpscope._totp.mdPOST /me/authentication_methods/:id/request_challengeendpoint (verification code delivery, supported forsmsmethods only), which the new Two-Factor Authentication section links to.smsmethod, so the request-challenge example references a method type that supports challenges.smsvariant of the Add Authentication Method endpoint (POST /me/authentication_methods/:type).POST /me/authentication_methods/:id/default, which remains undocumented._ratelimits.mdPOST /password/reset— the route exists but has no dedicated limiter.POST /me/reports/:type).too_many_requestserror code.Notes for reviewers
config/default.js). Note that the checked-in production config disables the app-side per-IP dimension for all per-IP limiters (presumably enforced at the CDN edge instead) — worth confirming with the backend team that the per-IP numbers still hold in production. The per-user limiters are unaffected.WWW-Authenticateheader is intentionally not mentioned for the 401 invalid-client case: the pinnedoauth2-serverfork sets it on an internal response object that is discarded on the error path, so it never reaches the client.contacts:read/contacts:writeare grantable on master but no endpoint currently enforces them, so they were deliberately left undocumented. The same applies tophones:write, which was kept only because it was already documented.transactions:writeremains documented as deprecated (product stance), although it is still functional.Related issues
uphold/backend#19003 (upcoming PKCE support — not covered here).
Impacted areas
Authentication, Applications, One-Time Password and Rate Limits pages of the API reference.
Steps to reproduce or test
Development
Verified every claim against
uphold/backendmaster (controllers,security-service,oauth-manager, the pinnedoauth2-serverfork, andconfig/default.js).QA
Render the four pages and confirm the flows work as described against the sandbox API.
Checklist
Breaking Changeif it applies.package.json.Deploy notes
N/A — no files removed, so no slate index changes are needed.
🤖 Generated with Claude Code