1. Register a client
Either request a client via Mirobody Support, or self-register:client_id / client_secret — keep them safe.
2. Authorization code flow (SSO)
Step 1: redirect the user to the authorize endpoint.redirect_uri?code=<code>&state=<csrf>.
Step 3: server-side, exchange the code for a token.
3. Server-side credentials grant
For headless usage when the user is pre-bound to the registered client:sub claim is the user_id registered with the client.
Response format
OAuth 2.0 standard format (not{success, code, msg, data}):