BMM CONNECT DOCUMENTATION
Complete a connection
Validate the callback and activate the creator's connection.
/api/connect/hosted/completeAuthentication and permissions
Send X-BMM-Client-ID and X-BMM-API-Key from your server. The API key authenticates the approved application; creator consent controls access to the account. A key alone does not authorise access to a creator.
The same user must have approved the pending connection. This step activates it only after callback validation.
Validate the callback first
Redirect the browser to authorization_url. Existing BMM sign-in, registration and explicit consent are unchanged. Approval returns code, state and iss to the exact registered callback; denial returns error=access_denied, state and iss. The hosted issuer is BMM_ORIGIN/api/connect/hosted. Validate the unique parameters, browser state, issuer and the same authenticated partner user before completing. Never accept the partner user ID from the callback query.
Do not send a completion request when consent was denied. Clear the pending cookie and show a cancelled state.
Parameters
JSON body; all fields are required.
Request
Success response
No access/refresh tokens are issued. Requests and codes expire with the ten-minute attempt; completion is single-use. A new start invalidates older unfinished attempts for this application/user. Connections become accessible only after completion. If completion's network outcome is unknown, read the connection; restart if needed, never blindly replay the code. Completing another hosted mapping for the same creator/application replaces the previous hosted mapping. Existing OAuth grants remain separate.
An invalid, expired, replayed or mismatched code returns 400. A revoked pending approval returns 410. After an uncertain result, read the connection before starting again.
Errors
Errors contain {"error":"message"}. Do not match error text or cache private responses. Full error guide.