Cencori OAuth
Let your product ask a Cencori user for access to their organization, then set up projects and API keys for them through the management API.
Cencori OAuth lets your product act on a Cencori organization with its owner's permission. The person clicks a button in your product, sees exactly what you are asking for, chooses an organization and approves. Your server receives a token limited to that organization and those permissions.
Use it when your product sets Cencori up for its users: a deployment platform that creates a Cencori project for each app, a FinOps tool that reads usage, or an app builder that issues a project key for what it builds.
OAuth or an API key?
An access token cannot call models. To call models for a user, use api_keys:write to create a project key and call the AI API with that.
How it works
Cencori OAuth is the OAuth 2.1 authorization code flow with PKCE.
- Create an OAuth app in your organization's settings. You get a client ID and a client secret.
- Send the person to Cencori with your client ID, the permissions you want and a PKCE challenge.
- The person signs in, chooses an organization and approves. Cencori sends them back to your redirect address with a
code. - Exchange the code on your server for an access token and a refresh token.
- Call the management API with the access token.
Endpoints
What Cencori requires
- PKCE with S256 on every authorization request. There is no plain method and no way to skip it.
- A client secret on every token request. The flow is for apps with a server; there is no implicit flow and no secret-less client.
- Exact redirect addresses. The
redirect_uriyou send must be one you registered, character for character. - Rotating refresh tokens. Each refresh returns a new refresh token and ends the old one.

