Permanently deletes a user account by removing their row from the Users sheet. This action cannot be undone. All catalog contributions (cut points, votes, activity logs) attributed to the user remain in the system.
Endpoint: USERS service — https://script.google.com/macros/s/AKfycbxAqyEcAHetH6yN4qccGILL-L3IzMSPVuVJ1kpuO86GqfDXTKP8cHrrB7UkKN1r_0g5/exec
Action: deleteUser
Deletion is permanent. Consider setting a user to inactive via updateUser if you need to revoke access while preserving their account history.
| Deleter role | Who they can delete |
|---|
Desarrollador | Any user |
Gefe / Jefe | Supervisor, Tecnico |
Supervisor | Tecnico only |
Request
The ID of the user to delete.
The active session token of the user performing the deletion. Used to verify role permissions.
Response
"success" on success, "error" on failure.
"Usuario eliminado." on success.
Example
const USERS_ENDPOINT = 'https://script.google.com/macros/s/AKfycbxAqyEcAHetH6yN4qccGILL-L3IzMSPVuVJ1kpuO86GqfDXTKP8cHrrB7UkKN1r_0g5/exec';
const session = JSON.parse(localStorage.getItem('gpsepedia_session'));
const response = await fetch(USERS_ENDPOINT, {
method: 'POST',
headers: { 'Content-Type': 'text/plain' },
body: JSON.stringify({
action: 'deleteUser',
payload: {
userId: 15,
sessionToken: session.SessionToken
}
}),
redirect: 'follow'
});
const result = await response.json();
if (result.status === 'success') {
console.log('User deleted successfully');
}