Hanzo AI
OpenapiIntegrations

Create device

Begins a device sign-in and returns the code to show the user plus how to poll for completion.

POST /v1/integrations/connectors/{provider}/device

Addresshttps://api.hanzo.ai/v1/integrations/connectors/{provider}/device
MethodPOST
Operationpost_integrations_connectors_by_provider_device
AuthAuthorization: Bearer $HANZO_API_KEY

Begins a device sign-in and returns the code to show the user plus how to poll for completion. KMS readiness is checked NOW rather than dead-ending the user at poll-done (connect() parity), and the per-provider connector cap is checked before the provider is called. The provider's device code is persisted only in the encrypted grants table and is NEVER returned.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
providerpathstringyesProvider is the user-scoped provider's registry id, from the path.
labelbodystring—Label names this connection so one user can hold several per provider ("work", "personal").
providerbodystring—Provider is the user-scoped provider's registry id, from the path.

Response

StatusBodyMeaning
200deviceStartOutok

200 body — 5 fields.

FieldInTypeAlwaysDescription
expiresAtbodystring—ExpiresAt is when the flow dies, RFC 3339 UTC.
flowbodystring—Flow is the id to poll with.
intervalbodyinteger—Interval is the seconds to wait between polls.
userCodebodystring—UserCode is the short code the user types at VerifyURL.
verifyUrlbodystring—VerifyURL is the page the user opens to enter UserCode.

Failure carries the platform error shape — see Errors.

Examples

hanzo integrations connectors device create <provider>

Integrations API · All Hanzo APIs · Interactive reference

How is this guide?

On this page