Allow this client to connect
const url = 'https://api.flotera.com/api/v1/mcp/authorize';const options = { method: 'POST', headers: { cookie: '__Host-erm_session=<__Host-erm_session>', 'Content-Type': 'application/json' }, body: '{"client_id":"example","redirect_uri":"example","code_challenge":"example","state":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.flotera.com/api/v1/mcp/authorize \ --header 'Content-Type: application/json' \ --cookie __Host-erm_session=<__Host-erm_session> \ --data '{ "client_id": "example", "redirect_uri": "example", "code_challenge": "example", "state": "example" }'Issues a short-lived authorization code and returns where to send the browser. The address is assembled by the server from the checked redirect URI — assembling it in the panel would put the check on the side that can skip it.
redirect_uri must match one registered for the client exactly:
string for string, no prefixes and no normalisation. An open redirect
here does not leak a URL, it leaks the fleet.
Access must be on. Issuing a code while the switch is off would promise access that does not exist.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
PKCE S256 challenge. Required — without it an intercepted code is usable by anyone.
Returned to the client unchanged so it can tell its own response from a planted one.
Examplegenerated
{ "client_id": "example", "redirect_uri": "example", "code_challenge": "example", "state": "example"}Responses
Section titled “Responses”Where to send the browser back.
object
Examplegenerated
{ "redirect_to": "example"}Request failed validation (code=validation_failed), with per-field errors.
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}Missing/invalid credentials (code=unauthorized).
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}Authenticated but not permitted. code=forbidden — role/scope mismatch; code=feature_not_entitled — the plan does not include the capability; code=account_frozen — the account is frozen and this operation is declared x-ermeon-frozen: deny. The three are deliberately distinct: only the last one is fixed by a top-up (13 §5.6).
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}A dependency the endpoint needs is not configured or is temporarily unavailable (code=unavailable). The rest of the API keeps working — an absent external integration must not take the service down.
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}