Endpoints
Discovery metadata (RFC 8414) lists everything:Flow
-
Register a client (once). Public clients use PKCE and no secret:
The response contains a
client_id(and aclient_secretfor confidential clients). -
Send the user to authorize. Generate a PKCE
code_verifier/code_challenge, then redirect the user to:The user signs in (if needed), sees a consent screen for their workspace, and approves. Cruq AI redirects back to yourredirect_uriwith?code=...&state=.... -
Exchange the code for tokens:
Returns
access_token(cruq_at_...),refresh_token,expires_in, andscope. -
Call the API with the access token, exactly like an API key:
Access tokens also work against the MCP server. Refresh with
grant_type=refresh_tokenwhen the access token expires.
Scopes
Today a singleapi scope grants full access to the user’s workspace, the same
reach as an API key. Finer-grained scopes may be added later; tokens already
carry a scope list.
