BMM CONNECT DOCUMENTATION
OAuth authorisation
Start the existing OAuth connection flow.
/api/connect/authorizeAuthentication and parameters
The browser supplies client_id, an exact redirect_uri, random state, code_challenge and code_challenge_method=S256. No API key belongs in this URL. Profile consent is required and earnings consent is optional.
Request and response
Generate a random state and PKCE verifier for every attempt, save them against the initiating user and browser session on your server, and redirect the browser to BMM. The S256 challenge is the base64url-encoded SHA-256 digest of the verifier.
Successful browser authorization returns to the exact registered callback:
Denial returns the callback with error=access_denied and the original state. Validate state before treating denial as a valid outcome. Before exchanging a successful code, require the exact issuer BMM_ORIGIN/api/auth, not just the origin. Atomically consume the pending request. Codes expire after ten minutes and can be redeemed only once. Exact callback matching and S256 PKCE are mandatory. Never bypass state if the user changed browser/device; ask them to restart.
Errors
400 can indicate an invalid callback or invalid/expired grant. 401 indicates credential or access failure. 403 on earnings means permission was not granted. 429 requires backoff. OAuth errors may contain error and error_description; use status and error code, not matching descriptions. Errors and recovery.