Discussion: applications for session ID in plugins?

I just realized the current session ID is now exposed in the API together with other user info (figma.currentUser.sessionId). I don’t know what to use it for yet but I’m sure there can be some interesting applications.

Session ID increases by 1 every time you reload the page or stay inactive in the file for some time (so you get disconnected from the multiplayer session). And it’s a part of the id of objects in the file. Also I discovered that duplicating a file adds 24 sessions to it for some reason.

So you can technically check which objects were created during a specific session. But past sessions would be useless since there is no way to track them in any way unless the plugin was opened during them. The current session is interesting though, I think I would allow you to check for newly created nodes.

I’d be curious to know what your ideas are for using this API feature!

1 Like