StartConnectorOAuth returns the provider authorize URL the console opens to…
StartConnectorOAuth returns the provider authorize URL the console opens to connect this org's account.
GET /v1/knowledge/connectors/{provider}/connect
| Address | https://api.hanzo.ai/v1/knowledge/connectors/{provider}/connect |
| Method | GET |
| Operation | get_knowledge_connectors_by_provider_connect |
| Auth | Authorization: Bearer $HANZO_API_KEY |
StartConnectorOAuth returns the provider authorize URL the console opens to connect this org's account. There is no server-side redirect — the console stays in control of the navigation. The URL carries a state this server SIGNED over the caller's validated org, so the connection the callback completes can only ever land in that org.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | string | yes | Provider is the connector to act on: github, slack, google or notion. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | kbAuthorizeOut | ok |
200 body — 1 field.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
authorizeUrl | body | string | — | AuthorizeURL is the provider's authorize endpoint with an org-bound signed state. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, KnowledgeApi } from 'hanzoai';
const api = new KnowledgeApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getKnowledgeConnectorsByProviderConnect({ provider: 'provider' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import KnowledgeApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = KnowledgeApi(client).get_knowledge_connectors_by_provider_connect(provider='provider')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.KnowledgeAPI.GetKnowledgeConnectorsByProviderConnect(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, knowledge_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = knowledge_api::get_knowledge_connectors_by_provider_connect(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.KnowledgeApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new KnowledgeApi(client).getKnowledgeConnectorsByProviderConnect();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/knowledge/connectors/<provider>/connect \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches knowledge through the knowledge tool, which names its 9 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_kb_connectors"
}
}
}'How is this guide?