Skip to main content
Modifies an existing user account. Allowed fields include Nombre_Completo, Privilegios, and Password. The Nombre_Usuario (username) field is permanently ignored — usernames cannot be changed. Endpoint: USERS service — https://script.google.com/macros/s/AKfycbxAqyEcAHetH6yN4qccGILL-L3IzMSPVuVJ1kpuO86GqfDXTKP8cHrrB7UkKN1r_0g5/exec Action: updateUser
For a user updating their own display name, use updateProfile instead. For a user changing their own password (with current-password verification), use changePassword.
Usernames (Nombre_Usuario) cannot be updated through this endpoint. The field is intentionally ignored server-side.
Updater roleWho they can update
DesarrolladorAny user
Gefe / JefeSupervisor, Tecnico
SupervisorTecnico only

Request

action
string
required
Must be "updateUser".
payload.userId
number
required
The ID of the user to update.
payload.sessionToken
string
required
The active session token of the user performing the update. Used to verify role permissions.
payload.updates
object
required
An object with one or more fields to update. All fields are optional individually.

Response

status
string
required
"success" on success, "error" on failure.
message
string
"Usuario actualizado." 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: 'updateUser',
    payload: {
      userId: 12,
      sessionToken: session.SessionToken,
      updates: {
        Nombre_Completo: 'María A. García',
        Privilegios: 'Supervisor'
      }
    }
  }),
  redirect: 'follow'
});

const result = await response.json();
if (result.status === 'success') {
  console.log('User updated successfully');
}

Build docs developers (and LLMs) love