List sessions
GET
https://api.vercel.com/v2/sandboxes/sessionsRetrieves a paginated list of sessions belonging to a specific sandbox. Results are sorted by creation time and paginated using an opaque cursor.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.sandboxes.listSessions({ project: "prj_abc123", name: "my-sandbox", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
"value"AuthorizationbearerToken
Default authentication mechanism
Filter sessions by sandbox name. Only sessions belonging to the specified sandbox are returned.