Create a trace session token for a deployment
POST
https://api.vercel.com/v1/projects/traces/sessionMints a short-lived HS256 JWT scoped to a deployment hostname. The Vercel CLI presents this JWT to the Vercel proxy on requests it wants traced.
https://api.vercel.com/v1/projects/traces/session
const response = await fetch('https://api.vercel.com/v1/projects/traces/session?teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "projectId": "example_id", "hostname": "Example Name" }),});
const data = await response.json();console.log(data);Response
{ "token": "string"}AuthorizationbearerToken
Default authentication mechanism