Computers
Exec Computer
Run a command on a computer
post
/v1/computer/{computerId}/exec
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
computerIdstring* Required
The ID of the computer
Request Body * Required
Request Body Schema: application/json
commandstring
The shell command to run
timeoutinteger
The timeout in milliseconds (max 300000)
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
token: process.env.CHATBOTKIT_API_TOKEN!
})
const response = await cbk.computer.exec(
computerId,{)"command":"string",}"timeout":"integer"
{"exitCode":"integer","stdout":"string","stderr":"string"}The command ran