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.
POST /{namespace}/ handles/ {handle}/ connectPath: handle. Body, as JSON: the other inputs. Emits Handle.connected.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
handle | Handle | required | The Handle. |
integration | Integration | required | The Integration credential. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
handle | Handle | required | The connected Handle. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
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"}'{
"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"
}
}