Authentication
The Benchling In Vivo API uses OAuth 2.0 access tokens to authenticate requests. These Bearer tokens are the predominant type of access token used with OAuth 2.0.
The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Create an API key
Only administrators can create API keys. Each tenant can have multiple keys, each with its own scopes.
- Click the Manage Team icon.
- Go to Integrations and select API keys.
- Click Create API key.
- Name the key and select its scopes.
- Click Create API key.
The client secret is shown only once, when the key is created. Store it securely. If you lose it, delete the API key and create a new one. The client ID stays visible afterward.
Find your API host
API requests go to your tenant’s API host, not the address you use in the browser:
If your tenant URL ends in overwatchresearch.com, use overwatchresearch.com in place of invivo.benchling.com. If you’re unsure of your tenant’s address, contact Benchling Support.
Get an access token
Exchange your API key’s client ID and secret for a token with Create a token, then send it on each request as Authorization: Bearer <access_token>. Tokens expire after the number of seconds given in expires_in.