List User Events
https://api.vercel.com/v3/eventsteamId parameter is supplied, then the events that are returned will be in relation to the Team that was specified.import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.user.listUserEvents({ limit: 20, since: "2019-12-08T10:00:38.976Z", until: "2019-12-09T23:00:38.976Z", types: "login,team-member-join,domain-buy", userId: "aeIInYVk59zbFF2SxfyxxmuO", principalId: "aeIInYVk59zbFF2SxfyxxmuO", projectIds: "aeIInYVk59zbFF2SxfyxxmuO", withPayload: "true", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();"value"Default authentication mechanism
principalId instead. If principalId and userId both exist, principalId will be used.principalId parameter may be specified to filter events generated by a specific principal.true, the response will include the payload field for each event.