Skip to content

Handle routes: connect

The Handle Verbs connect as api.sb routes, with inputs, result, refusals and an example.

Reference for Handle, one group of Handle routes.

Handle.connect

Connect binds a Handle to the Integration credential it publishes through, once the platform confirms the account. Verb page.

Text
POST /{namespace}/handles/{handle}/connect

Path: handle. Body, as JSON: the other inputs. Emits Handle.connected.

Inputs

InputTypeRequiredDescription
handleHandlerequiredThe Handle.
integrationIntegrationrequiredThe Integration credential.

Returns

OutputTypeRequiredDescription
handleHandlerequiredThe connected Handle.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/handles/handle_FcnNwYQujc/connect \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"integration":"integration_alVwjQcmRy"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "handle": {
    "$id": "https://api.sb/leaseline.app/handles/handle_FcnNwYQujc",
    "$type": "Handle",
    "venue": "Example venue",
    "name": "Leaseline"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Handle.connect",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}