Skip to main content
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 roleWho they can delete
DesarrolladorAny user
Gefe / JefeSupervisor, Tecnico
SupervisorTecnico only

Request

action
string
required
Must be "deleteUser".
payload.userId
number
required
The ID of the user to delete.
payload.sessionToken
string
required
The active session token of the user performing the deletion. Used to verify role permissions.

Response

status
string
required
"success" on success, "error" on failure.
message
string
"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');
}

Build docs developers (and LLMs) love