Hanzo
OpenapiKnowledge

CompleteConnectorOAuth finishes an OAuth connection: it exchanges the…

CompleteConnectorOAuth finishes an OAuth connection: it exchanges the provider's code for a token, seals that token in KMS, and records the connection.

GET /v1/knowledge/connectors/{provider}/callback

Addresshttps://api.hanzo.ai/v1/knowledge/connectors/{provider}/callback
MethodGET
Operationget_knowledge_connectors_by_provider_callback
AuthAuthorization: Bearer $HANZO_API_KEY

CompleteConnectorOAuth finishes an OAuth connection: it exchanges the provider's code for a token, seals that token in KMS, and records the connection. THE ORG COMES FROM THE SIGNED STATE, not from a header and not from the provider, so an attacker cannot bind their own account to someone else's org — a tampered, expired or foreign-provider state is refused outright. The token itself is never returned, never written into the document, and never logged; the document holds only its KMS path.

Request

4 fields.

FieldInTypeRequiredDescription
providerpathstringyesProvider is the connector completing its flow, from the path.
codequerystringCode is the provider's authorization code, exchanged for a token.
statequerystringState is the org-bound value this server signed at connect time.
errorquerystringError is the provider's denial reason when the user refused consent.

Response

StatusBodyMeaning
200connectionOutok

200 body — 3 fields.

FieldInTypeAlwaysDescription
accountbodystringAccount names the connected external account, when the provider reports one.
providerbodystringProvider is the connector this answer is about.
statusbodystringStatus is the connection state: connected or disconnected.

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.


Knowledge API · All Hanzo APIs · Interactive reference

How is this guide?

On this page