import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const devboxTunnelView = await client.devboxes.createTunnel('id', { port: 0 });
console.log(devboxTunnelView.devbox_id);{
"devbox_id": "<string>",
"port": 123,
"url": "<string>"
}[Deprecated] Use POST /v1/devboxes//enable_tunnel instead. This endpoint creates a legacy tunnel. The new enable_tunnel endpoint provides improved tunnel functionality with authentication options.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const devboxTunnelView = await client.devboxes.createTunnel('id', { port: 0 });
console.log(devboxTunnelView.devbox_id);{
"devbox_id": "<string>",
"port": 123,
"url": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Devbox ID.
Devbox port that tunnel will expose.
Was this page helpful?