Skip to content

Build a partner app with Biocompile OAuth

Last updated

On this page

A Biocompile partner app is another company’s software, such as a LIMS or an ELN, that acts for the people who connect it. It signs people in with OAuth 2.1 and gets tokens that act as each person, never with more rights than they have and only with the scopes they approve.

The organization that builds the app registers it, and people in any organization can then connect it. Each connection is one person’s consent, for one organization.

Register an app

Organization owners and admins register apps:

  1. Open Organization → OAuth apps and choose Register app.
  2. Enter the Name people see when they connect the app.
  3. Enter up to 10 Redirect URIs, one per line. Each must use https and is matched exactly.
  4. Optionally enter a Homepage URL, shown to people when they connect.
  5. Tick the scopes the app may ever ask for. People can approve fewer, never more.
  6. Save the app. Result: the page shows “App registered” with the Client ID and Client secret.

The client secret starts with bcc_ and is shown once. Give it to the app’s developers through a secure channel.

Connect people to the app

The app uses the authorization code flow with PKCE, which is required for every client:

  1. Send the person’s browser to GET https://app.biocompile.com/api/v1/oauth/authorize with response_type=code, your client_id, a registered redirect_uri, the scope, a state and a code_challenge with code_challenge_method=S256.
  2. The person signs in, chooses an organization and approves. Result: the browser returns to your redirect URI with code, state and iss.
  3. Exchange the code at POST https://app.biocompile.com/api/v1/oauth/token with grant_type=authorization_code, the code, the redirect_uri and the code_verifier. Authenticate with HTTP Basic, or send the client ID and secret as form fields.
  4. Store the refresh token. Result: you hold an access token for 10 minutes and a refresh token.

Refresh tokens rotate on every use. Presenting a used refresh token again revokes the whole connection, because it means someone else holds a copy. The endpoints are listed at /.well-known/oauth-authorization-server.

Rotate, disable or delete an app

Each change on Organization → OAuth apps takes effect at once:

ActionEffect
Rotate secretThe old secret stops working immediately. Connections stay, but the app cannot get tokens until it uses the new secret.
DisableEvery connection is revoked and the app cannot start new ones. Enabling it again does not restore the old connections.
Narrowing scopesRevokes every connection that holds a scope the app may no longer ask for.
DeleteDisables the app, revokes every connection and removes it.

Every registration, change, rotation and deletion is recorded in the organization’s audit log. The secret never is.

Verification

A new app is unverified. The consent screen warns people that Biocompile has not checked who is behind it. To have an app verified, contact Biocompile support with its client ID. Staff check the company behind it, and a verified app shows as Verified.

Changing the app’s name, homepage or redirect URIs makes it unverified again until staff check it again. Changing its scopes or disabling it keeps the verification.

Billing for partner apps

API calls from a partner app are not billed. The work its calls start, such as assistant turns, analyses and paid tools, is charged to the person’s organization exactly as in the app, under the same spending limits and approvals.

Common questions

Who can connect a Biocompile partner app?

Any person in any organization. Each connection is that person’s own consent, limited to the organization and scopes they approve.

What happens to connections when I rotate the client secret?

They stay. The app cannot refresh tokens or exchange codes until it uses the new secret, so deploy the new secret right after rotating.

How does a partner app get verified?

Contact Biocompile support with the app’s client ID. Verification is done by Biocompile staff and is not self-service.

Controller: Biocompile, Inc.

Your first project starts here.

Free to start, with credits included.

We use this address to prefill your signup. A founder may email you once to help you get started. No newsletter. Privacy Policy

Already have an account? Sign in