Quickstart
Create an app and complete your first OAuth authorization-code flow.
Create a partner app
- Open
/dashboard/apps/new. - Choose a public client for browser-based integrations.
- Add your partner app URL, for example
https://partner.example.com. - Add your callback URL, for example
https://partner.example.com/oauth/callback. - Start with read-only scopes during development. Add create or update scopes only when the workflow writes back to Workspace.
Add the authorization button
If you are using a coding agent, start with the AI agent implementation prompt. It includes the button, PKCE routes, existing env names, and server-side Workspace API requirements.
export function AuthorizeWithQentrahButton() {
return (
<a href="/api/qentrah/oauth/start">
Authorize with Qentrah
</a>
);
}Build the authorization URL
const workspaceBaseUrl = process.env.QENTRAH_WORKSPACE_API_URL!;
const authorizationUrl = new URL("/oauth/authorize", workspaceBaseUrl);
authorizationUrl.searchParams.set("response_type", "code");
authorizationUrl.searchParams.set("client_id", process.env.QENTRAH_CLIENT_ID!);
authorizationUrl.searchParams.set("redirect_uri", "https://partner.example.com/oauth/callback");
authorizationUrl.searchParams.set("scope", "openid profile email offline_access organization:read client:read property:read");
authorizationUrl.searchParams.set("code_challenge", codeChallenge);
authorizationUrl.searchParams.set("code_challenge_method", "S256");