machines
Mint a connect token.
Changed onReturns a short-lived token that opens only this machine's connect bridge, /v1/machines/{id}/connect/{port}, and, by default, its descendants. Pass port to limit access to one published guest port, and includeDescendants: false to exclude branches. It is refused on every other endpoint, expires after ttlSeconds (3600 by default, never past the minting key's own expiry), and can be sent as the access_token query parameter on a WebSocket upgrade, so a client that cannot set headers, such as a DevTools client, can still connect. Requires the machine:exec scope.
post/v1/machines/{id}/connect-token
Request
- Base URLhttps://api.smolmachines.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
idstring required
Machine id
Request body
Response
Connect token minted; the token is in this response and nowhere else
Changes
- info
endpoint added
- info