Última actualización:

Gestionar tokens de API para usuario

Aprenda a generar y revocar tokens de API de usuario necesarios para las integraciones con SafetyCulture.

What are the differences between service user and user API tokens?

Service user and user API tokens offer flexible ways to connect external tools to SafetyCulture.

  • Service user API tokens are best suited for long-term or shared integrations where access should stay the same regardless of user changes. You can set their permissions, which makes them ideal for stable, system-level connections.

  • User API tokens are suitable for one-off tasks, personal workflows, or scenarios where access needs to reflect a specific user's permissions or group and site memberships.

Choosing the correct token type ensures your integration runs smoothly while matching your organization's security and access needs.

Functionality

Service user API token

User API token

Ownership

Created for a service user (system-based or integration-focused)

Created by an individual user

Login

Cannot be used to log in

Can be used to log in

Permissions

Assigned for each service user

Inherits the user’s permission set

Group and site access control

Not supported

Inherits access from the user

Integrations

Designed for long-term or shared integrations

Suited for short-term or personal use

Token stability

Not affected by user changes

Will expire if user is deactivated or exits the organization

Activity logs

Shows the service user name

Shows the individual user’s name

Visibility

Not shown in the user list

Visible in user settings

Billing

Does not count toward seat billing

Counts toward assigned user seat

Cada usuario puede crear hasta 10 tokens de API de usuario activos. Por otra parte, cada organización puede tener hasta 20 tokens de usuario de servicio activos.

Si pertenece a varias organizaciones, debe crear tokens de API independientes para sus integraciones. Esto se aplica tanto a los tokens de API de usuario como a los de usuario de servicio.

What data can API requests access with API tokens?

API tokens authorize API requests to act on behalf of a specific subject in SafetyCulture. That subject is either:

  • The user who created a user API token, or

  • The service user who owns a service user API token.

For every request, the SafetyCulture API checks the subject’s permissions and access.

Si desea que una integración refleje exactamente lo que ve en SafetyCulture, utilice su propio token de API de usuario. Si desea una vista diferente (por ejemplo, un acceso más amplio gestionado por un administrador), considere usar un token de API de usuario de servicio.

Permissions

Permissions control what actions API requests can perform.

  • User API tokens use the permission set of the user who created the token. If that user cannot perform a task in SafetyCulture, API requests that use their token cannot perform it either.

  • Service user API tokens use the permission set you assign to the service user. If the service user does not have permission to perform a task, API calls made with their token cannot do so.

Access

Access controls which items API requests can return or work with.

  • API requests that use an API token can only return templates, inspections, assets, and other items that the subject (user or service user) can access in SafetyCulture.

  • For user API tokens, this access typically comes from the user’s groups, sites, and any sharing or access rules you set on content.

  • For service user API tokens, this access comes from the access and sharing you configure for the service user and your content (for example, templates or inspections that you explicitly share with that service user or include in rules that cover it).

  • For content that another organization shares with yours, the template or inspection must be shared in a way that includes the subject (user or service user).

Los tokens de API para usuarios caducan tras 30 días de inactividad. La caducidad de los tokens impedirá que sus integraciones funcionen hasta que genere uno nuevo.

Si su organización utiliza inicio de sesión único (SSO) y no permite inicios de sesión sin SSO, es posible que no se le solicite que introduzca una contraseña al generar un nuevo token de API de usuario.

Generar un token de API para usuario

  1. Inicie sesión en la aplicación web.

  2. Haga clic en su nombre de usuario en la esquina inferior izquierda de la página y seleccione Mi perfil.

  3. Haga clic en Icono de configuraciónAjustes en la parte superior derecha de la página.

  4. Seleccione Tokens de API en la parte superior derecha de la página.

  5. Haga clic en Generar token de API. Haga clic en Generar token para API a través de la aplicación web.

  6. En la ventana emergente, introduzca un nombre para el token de API de usuario y la contraseña de su cuenta. Generar un token de usuario para API a través de la aplicación web.

  7. Haga clic en Generar.

  8. Haga clic en el token de API de usuario para copiarlo. Guarde el token de forma segura antes de cerrar la ventana.

Revocar un token de API para usuario

  1. Inicie sesión en la aplicación web.

  2. Haga clic en su nombre de usuario en la esquina inferior izquierda de la página y seleccione Mi perfil.

  3. Haga clic en Icono de configuraciónAjustes en la parte superior derecha de la página.

  4. Seleccione Tokens de API en la parte superior derecha de la página.

  5. Haga clic en Delete iconRevocaren el lado derecho del token.

  6. En la ventana emergente, haga clic en Revocar. Revoque un token de API de usuario desde la aplicación web.

Preguntas frecuentes

Depende de cómo esté configurada la integración.

  • Para integraciones personalizadas (como Workato, scripts o llamadas directas a la API mediante un usuario de servicio o un token de API de usuario): . Regenerar el token interrumpirá la integración hasta que actualice manualmente el token de sustitución en los ajustes de la integración.

  • Para integraciones nativas de SafetyCulture (como Power BI, Microsoft Teams o SharePoint): no. Estas integraciones utilizan tokens gestionados por el sistema, por lo que revocar o regenerar sus tokens de API no les afectará.

Revocar un token de API de un usuario de servicio impide su uso de forma inmediata, aunque podrá volver a generarlo más adelante. Esto resulta útil si desea pausar temporalmente una integración sin eliminar el token por completo.

La eliminación de un token de API de un usuario de servicio lo elimina de forma permanente de su organización. Solo puede eliminar un token después de haberlo revocado. Una vez eliminado, no se puede recuperar ni regenerar, por lo que será necesario crear uno nuevo si desea restablecer la integración.

If a template appears in SafetyCulture but does not appear in the feed/templates when you call the API with a token, check the following areas:

  1. Who the token belongs to: Identify whether the token belongs to a user or a service user.

    • For a user API token, confirm that the user can access the template in the web app.

    • For a service user API token, confirm that the service user’s configuration gives it access to the template.

  2. Sharing and access: For templates shared from another organization, make sure the template is shared in a way that includes the token’s subject (user or service user). For example:

    • The template is shared directly with the user.

    • The template is shared with a group the user belongs to.

    • The template is shared or configured so that the service user is included in access rules.

  3. Permission set: Check the permission set for the user or service user. The subject needs permission to access templates and their locations. If the subject does not have permission, API requests that use the token cannot return those templates.

If the user or service user does not have explicit access, API requests that use that token do not return the template, even if someone else in your organization can access it.

¿Necesita más ayuda?
En este artículo