/hubs/{hub_id}/pairing/confirm
Confirm a joining device's setup code
Needs the
hubs:write
scope.
Answers a network.setup_code_requested event: a device added with
only its PIN, or none, that asks for its most secure classes. Show
the event's code and have someone check it against the device's
label. When it matches, send this, with setup_code the label's
first five digits if pin_needed is true. When it doesn't, close
the window (DELETE /hubs/{hub_id}/pairing). Unanswered within
expires_in_s seconds, or with the wrong digits, the device joins
without those classes and has to be removed and added again. 404
when no device is waiting: none asked, it was answered, or its time
ran out.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
hub_id
|
path |
string
|
The hub ID printed on the hub (lowercase). |
Body
setup_code
string · optional
The setup code's first five digits, from the label. Only when pin_needed is true.
Responses
204
Confirmed.
Errors
invalid_request
The request is malformed or a field is invalid.
unauthenticated
Missing, malformed, revoked or unknown API key.
insufficient_scope
The key lacks the scope this operation needs.
not_found
No such resource, or it is not your organization's.
hub_offline
hub_offline: the hub is not connected. hub_unavailable: it is connected but cannot do it now, for example its radio is down or it does not know the time yet.