Zuletzt aktualisiert:

Verwalten von Benutzer-API-Token

In diesem Artikel erfahren Sie, wie Sie API-Token generieren können., die für Integrationen mit SafetyCulture erforderlich sind.

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

Jeder Nutzer kann bis zu 10 aktive Nutzer-API-Token erstellen. Jede Organisation kann hingegen bis zu 20 aktive Service-Nutzer-Token haben.

Wenn Sie zu mehrere Organisationen gehören, müssen Sie separate API-Tokens für Ihre Integrationen erstellen. Dies gilt sowohl für Service-Nutzer- als auch für Nutzer-API-Tokens.

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.

Wenn Sie möchten, dass eine Integration genau das widerspiegelt, was Sie in SafetyCulture sehen, verwenden Sie Ihr eigenes Nutzer-API-Token. Wenn Sie eine andere Ansicht wünschen (z. B. einen breiteren, von einem Administrator verwalteten Zugriff), sollten Sie ein Servicenutzer-API-Token verwenden.

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).

Benutzer-API-Token verfallen nach 30 Tagen Inaktivität. Abgelaufene Token verhindern, dass Ihre Integrationen funktionieren, bis Sie einen neuen Token generieren.

Wenn Ihre Organisation Single Sign-On (SSO) verwendet und keine Nicht-SSO-Anmeldungen zulässt, werden Sie möglicherweise nicht zur Eingabe eines Passworts aufgefordert, wenn Sie einen neuen Nutzer-API-Token erstellen.

Benutzer-API-Token generieren

  1. Melden Sie sich in der Web-App an.

  2. Klicken Sie unten links auf der Seite auf Ihren Nutzernamen und wählen Sie Mein Profil aus.

  3. Klicken Sie in oben rechts auf der Seite auf Symbol für EinstellungenEinstellungen.

  4. Wählen Sie oben rechts auf der Seite auf API-Token aus.

  5. Klicken Sie auf API-Token generieren. Klicken Sie auf „API-Token über die Web-App generieren“.

  6. Geben Sie im Pop-up-Fenster einen Benutzer-API-Token-Namen und das Passwort für Ihr Konto ein. Mithilfe der Web-App einen API-Token generieren.

  7. Klicken Sie auf Generieren.

  8. Klicken Sie auf den Benutzer-API-Token, um es zu kopieren. Speichern Sie den Token sicher, bevor Sie das Fenster schließen.

Einen Benutzer-API-Token widerrufen

  1. Melden Sie sich in der Web-App an.

  2. Klicken Sie unten links auf der Seite auf Ihren Nutzernamen und wählen Sie Mein Profil aus.

  3. Klicken Sie in oben rechts auf der Seite auf Symbol für EinstellungenEinstellungen.

  4. Wählen Sie oben rechts auf der Seite auf API-Token aus.

  5. Klicken Sie auf Delete iconWiderrufenauf der rechten Seite des Tokens.

  6. Klicken Sie in dem Popup-Fenster auf Widerrufen. Deaktivieren Sie einen Nutzer-API-Token über die Web-App.

Häufig gestellte Fragen

Das hängt davon ab, wie Ihre Integration eingerichtet ist.

  • Für benutzerdefinierte Integrationen (wie Workato, Skripte oder direkte API-Aufrufe mit einem Service-Nutzer oder Nutzer-API-Token): Ja. Das Regenerieren des Tokens unterbricht die Integration, bis das neue Token manuell in den Integrationseinstellungen aktualisiert wurde.

  • Für integrierte SafetyCulture-Integrationen (wie Power BI, Microsoft Teams oder SharePoint): Nein. Diese Integrationen verwenden systemverwaltete Tokens, sodass das Widerrufen oder Regenerieren Ihrer API-Tokens keine Auswirkungen auf sie hat.

Das Deaktivieren eines API-Tokens für einen Service-Nutzer stoppt dessen Funktion sofort, aber Sie können das Token später jederzeit wieder neu generieren. Das ist praktisch, wenn Sie eine Integration vorübergehend pausieren möchten, ohne das Token vollständig zu entfernen.

Das Löschen eines API-Tokens für einen Service-Nutzer entfernt es dauerhaft aus Ihrer Organisation. Ein Token kann nur gelöscht werden, nachdem es deaktiviert wurde. Sobald es gelöscht ist, kann das Token nicht wiederhergestellt oder neu generiert werden. Wenn Sie die Integration erneut verbinden möchten, müssen Sie ein neues Token erstellen.

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.

Brauchen Sie noch weitere Hilfe?
In diesem Artikel