API Keys
Auth

Ask a super-admin to approve a service signing key in the browser

Changed on

No session (RFC 8628 device-authorization shape). The consumer sends the P-256 public JWK it wants registered and a proof of possession: a compact ES256 JWS signed by that key's private half, with header kid = the key's RFC 7638 thumbprint and claims aud = this endpoint's absolute URL, iat and exp (exp - iat at most 300 seconds). Returns a user code and the accountant-app approval URL; a signed-in super-admin approves or denies the request there within 10 minutes, and approval registers the key exactly as POST /admin/service-client-keys does. Nothing secret is returned. Rate limited per client IP. Answers 503 before validating the body while the service-assertion exchange is not configured, so nothing is registered that could not then be exchanged.

post/auth/service-client-key-requests

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    none required

Request body

OpenServiceClientKeyRequestInput required
name, string required
publicKeyJwk, object required

P-256 public JWK (kty EC, crv P-256, x, y). Must not contain d.

expiresInDays, integer

Lifetime of the key once approved; default 180

proof, string required

Compact ES256 JWS over {aud, iat, exp}, signed by this key, header kid = its thumbprint

Response

Request opened; show the user code and open the verification URL

OpenedServiceClientKeyRequestResponse required
success, true required
data, object required

Changes