computers.approveComputerPairing
const url = 'https://example.com/v1/computer-pairings/example/approve';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","shared":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/computer-pairings/example/approve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "shared": true }'Approves a machine. OpenBot creates a connector Computer for it, and the machine gets its token on its next poll. The Computer belongs to the caller, or to the organization when shared is true. When the same machine pairs again, OpenBot keeps its Computer and only changes the token. Only a person can approve.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "name": "example", "shared": true}Responses
Section titled “Responses”Success
object
object
Example
{ "owner": { "_tag": "Member" }, "source": { "_tag": "Provider" }, "state": "starting"}ComputerInvalid | OrganizationRequired
AuthenticationRequired
object
Example
{ "_tag": "AuthenticationRequired"}@nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin
ComputerNotFound | ComputerPathNotFound | ComputerSessionNotFound | ComputerProviderNotFound | PairingInvalid
@nmnmcc/ability/Authorizer/Pending | ComputerProviderInUse | ComputerConflict | ComputerUnsupported | ComputerNotReady
object
object
object
object
object
Example
{ "_tag": "Pending"}RateLimited
object
Example
{ "_tag": "RateLimited"}ComputerProviderFailed | ComputerExecutionFailed
ComputersUnavailable | AuthenticationUnavailable | RequestFailed