All Collections
Flatfile Data Exchange Platform
How to Determine Who Accessed a Space
How to Determine Who Accessed a Space
Elisa Dinsmore avatar
Written by Elisa Dinsmore
Updated over a week ago

You may want to differentiate between invited users and guests who access a space using a guestLink. Maybe you want to record metadata based on who is taking actions within a space.

The context of every event that fires will list the actorId of the user who is present or initiated behavior in a space. A guest will have an actorId like us_g_1234, whereas a user will have an actorId like us_usr_1234. This would allow you to listen for that actorId and do something based on the kind of Id that is returned.

    listener.on("commit:created", async (event: FlatfileEvent) => {
const {actorId, spaceId} = event.context;
//Add metadata to space
Did this answer your question?