User Impersonation
Allows System Administrators (admins) to impersonate or act on behalf of any user in their plan to make API calls. As an admin, you might do this to troubleshoot a user problem or cover for vacations and sick time. As with cURL, the email address used to identify the user must be URI-encoded.
An admin cannot impersonate another admin.
NOTE: You must manually generate a token to assume user.
cURL example
curl https://api.smartsheet.com/2.0/sheets \
-H "Authorization: Bearer ll352u9jujauoqz4gstvsae05" \
-H "Assume-User: jane.doe%40smartsheet.com" \
C# example
SmartsheetClient smartsheet = new SmartsheetBuilder()
.SetAccessToken(accessToken)
.SetAssumedUser("jane.doe@smartsheet.com")
.Build();
Java example
smartsheet.setAssumedUser("jane.doe@smartsheet.com");
Node.js example
// Set options
var options = {
assumeUser: "jane.doe@smartsheet.com"
};
// List Sheets
smartsheet.sheets.listSheets(options)
.then(function(sheetList) {
console.log(sheetList);
})
.catch(function(error) {
console.log(error);
});
Python example
smartsheet_client.assume_user("jane.doe@smartsheet.com")
Ruby example
smartsheet.sheets.list(
header_override: {:'Assume-User' => CGI::escape('jane.doe@smartsheet.com')}
)