Scripting
Model

Session
Scripting Extension only

A Session contains information about the user currently running the script. There is only ever one session when a user runs a script. It can be accessed via the session global variable.

currentUser

typedef
Collaborator | null

The user currently running the script, or null if the script is running in a publicly shared base.

Example
console.log(`The name of the current user is ${session.currentUser.name}.`);
Example
// Display the profile picture of the current user
console.log(`![${session.currentUser.name}](${session.currentUser.profilePicUrl})`);