AI agent getting started? Read Agents: start here first.
Host your app on infrastructure you choose, and use OpenEngineering for its engineering data, relationships and change control. Build a supplier portal, a verification dashboard or a specialised part review interface over the same objects your team uses in the workspace.
A hosted app is a React bundle published into a project and run inside the OpenEngineering workspace. See hosted apps.
Choose whose authority the app uses
Section titled “Choose whose authority the app uses”| Integration | Identity and access | Authentication |
|---|---|---|
| An app people use with their own engineering permissions | The signed-in person, limited further by the app’s approved scopes | A registered OAuth client and the person’s consent |
| A scheduled job or automation with its own access | A service identity with explicitly assigned grants | Exchange a service credential on the backend |
For a server app, the browser calls your backend. Your backend calls the OpenEngineering API host through the SDK over HTTPS. You provide the interface and hosting; the platform checks access, validates engineering changes and records their history.
An OAuth registration is specific to one organisation. A person must belong to that organisation to connect. A grant does not add permissions the person lacks, and project and branch protection still apply. A service identity instead uses its own grants; it does not represent each person visiting your app.
Install the SDK for Node.js. You need a backend callback address, a known object to read, and an organisation administrator who can register your client. The hosted API is https://api.openeng.io.
OAuth apps can request object and branch operations. They cannot use that grant to publish types, administer membership or run platform agents.
Authenticate people using your app
Section titled “Authenticate people using your app”A person signs in to OpenEngineering and approves the access your app requests. The app receives its own access token and makes SDK calls for that person. It does not receive their workspace session or identity-provider password.
Before you connect
Section titled “Before you connect”For a confidential backend, generate a key pair once during setup:
import { generateClientKeys } from "@openengio/sdk/admin";
const keys = await generateClientKeys();- Store
keys.privateKeyin your backend’s secret store. - Give the administrator only
keys.publicKeySet, serialized as JSON. - Reuse the client and keys across sign-ins; do not generate new ones each time.
Register the client
Section titled “Register the client”- In the intended organisation, open Admin and choose Clients.
- Under Register a client, enter a Name, choose Confidential for Type, and enter your callback URL under Redirect addresses, one per line.
- Paste
keys.publicKeySet, serialized as JSON, into Public key set (JSON). - Select only the scopes the app needs.
- Choose Register, then keep the client identifier with the app’s server-side configuration.
Redirect addresses must match the registered addresses. Use your app’s callback address rather than the platform sign-in callback. Registration declares which scopes the app may request; each user still approves their connection.
Register through the administrator’s web session. Agent-operated CLI requests use browser confirmation.
The available scopes are:
| Scope | What the app may request on the person’s behalf |
|---|---|
objects.read | Read objects, relationships, history, project types and projects |
objects.write | Create, change and delete objects, and run verbs, validated operations defined for a type |
branches.read | Read branches, differences, conflicts, history and proposals |
branches.write | Create and abandon branches, submit and refuse proposals, and read branches |
branches.manage | Merge branches, delete writable branches, and recover changes |
offline_access | Refresh the connection while the person is away, for up to seven days |
Request only what the workflow needs. An editing workflow that reads objects and submits proposals (branch review requests) will usually need objects.read, objects.write and branches.write. Add branches.manage only if the app must merge or recover operations and the person has that authority. A grant-scope refusal means the requested operation is outside the app’s approved OAuth scopes.
Connect a reviewer and read one object
Section titled “Connect a reviewer and read one object”When a person connects, send them through the platform’s authorization flow with the registered client and requested scopes. The consent screen identifies the app, organisation and requested access. A person may approve the request or decline it, and may approve only a subset of the requested scopes. Keep each connection associated with that person’s account in your app; do not share it across people.
The grant can exercise only its approved scopes and the person’s underlying permissions. Request only the access the workflow needs. offline_access allows the connection to be refreshed while the person is away; without it, the person must reconnect when access expires. The token represents delegated API access. Your app still owns its sign-in, account identity and application session.
- Start authorization with
connectClientfrom Administration. - Complete the callback.
- Use the session’s access token with an Objects client. A
selectornames the target project and branch or baseline:
import { connectClient, type ClientConnection, type ClientSession,} from "@openengio/sdk/admin";import { createHttpsTransport, createObjectsTransportClient,} from "@openengio/sdk/objects";
const connection = await connectClient({ platform: "https://api.openeng.io", clientId: "client-id", privateKey: "private-key", redirectUri: "https://app.example.com/callback",});const authorizationUrl = await connection.authorizationUrl(["objects.read", "offline_access"]);console.log(authorizationUrl);
export function finishConnection(pending: ClientConnection, callbackUrl: string): Promise<ClientSession> { return pending.finish(callbackUrl);}
export async function readObject(session: ClientSession, projectId: string, objectId: string) { const origin = "https://api.openeng.io"; const transport = createHttpsTransport(origin); const objects = createObjectsTransportClient(transport, origin, await session.accessToken()); return objects.readObject({ selector: { projectId, ref: "main" }, input: { objectId }, });}After completing the callback, call readObject with the session and your known object ID. Compare the result with the workspace on main. Preserve any refusal instead of rendering it as an empty record.
Follow the protocol by hand
Section titled “Follow the protocol by hand”For endpoint discovery, PKCE, token exchange and raw HTTP requests, use the OAuth protocol walkthrough.
Disconnect and administer access
Section titled “Disconnect and administer access”A person can disconnect the app from Connected apps in their OpenEngineering account settings. This ends the app’s grants for that person. If they later want to use the app again, ask them to connect and consent again; do not reuse a disconnected grant.
An organisation administrator can open Admin → Clients to revoke a client. Revocation ends access for that client across its connected users. Client registration and consent are separate: registration limits what the client may ask for, while each person decides what access to grant.
Authenticate a backend integration
Section titled “Authenticate a backend integration”For a scheduled job with its own grants, follow Authenticate an automation.
Add writes after the first read
Section titled “Add writes after the first read”- Create a working branch.
- Make changes on that branch.
- Inspect the diff.
- Submit a branch merge request.
An OAuth app needs both the appropriate approved scopes and the user’s underlying permissions for each operation.
Honor project protection and type change-control rules. An external interface uses the same merge rules as the workspace.
Handle the platform’s outcomes explicitly:
- A completed operation updates the interface with its result.
- A rejected operation shows the reason and preserves the person’s draft.
To recover a write whose completion could not be determined:
- Keep the correlation ID you send with an object write.
- If you cannot determine whether the write completed, call
objects.recoverwith the same selector andinput: { correlationId }before retrying. For example, use the same correlation ID to recover a timed-outobjects.mutate. - For an OAuth app, ensure the
branches.managescope is approved; it is listed in the scope table earlier on this page. - For branch operations, use
inspectBranchOperationto inspect the outcome. They have no recovery route.
Check the integration
Section titled “Check the integration”Start with a read-only view over one project. Use OAuth for individual access, or a service identity for deliberately shared automation access. Confirm that the objects match the workspace and that out-of-scope requests are refused.
For an OAuth app, test declining consent and disconnecting from Connected apps before adding writes. Then add a branch-based editing workflow with the required scopes and permissions.
CLI and SDK explains the available interfaces. Access and permissions explains the distinction between memberships, operations a person explicitly authorizes an agent to perform, and app grants.