BotConnector

Authentication

Every request to the Hosted Developer API is authenticated with an API key that belongs to your BotConnector account.

Create a key

Open Workspace → API Keys and create a key. Keep it in a secret manager rather than in a document or a chat message.

Keys created there start with bc_live_. The rest of the string is the secret.

Send it

Pass the key as a Bearer token on every request:

Authorization: Bearer bc_live_...

A request without a valid key returns an authentication error. There is no anonymous tier and no query-string alternative — the header is the only accepted form.

From the OpenAI SDKs

The hosted API is OpenAI-compatible, so the SDKs need only a base URL and the key:

python
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.botconnector.id/v1",
    api_key=os.environ["BOTCONNECTOR_API_KEY"],
)

print(client.models.list())
javascript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.botconnector.id/v1",
  apiKey: process.env.BOTCONNECTOR_API_KEY,
});

console.log(await client.models.list());

Handling keys

Keys can be created, listed, and revoked from Workspace.

Keep the key on the server. Never ship it in client-side code, a mobile app bundle, or a public repository, and never paste it into a support message. If a key leaks, revoke it in Workspace and create a replacement.

Next