Personal Access Tokens

You can request a Personal Access Token from the API section in the Contentful Web App. You’ll need access to the Content Management API to generate one.

By default, tokens created by users are not automatically authorized for every organization they belong to. If token authorization enforcement is activated for an organization, users must manually authorize each token before it can be used.

To authorize a token:

  1. Go to your Personal Access Tokens list.

  2. Click Authorize next to the organization you want the token to access.

  3. If the org enforces SSO, you'll be prompted to authenticate before authorization is completed.

This added step ensures tokens are only active where they are intentionally linked.

As an admin, you can deauthorize tokens to revoke their access to your organization—without removing the user or revoking the token entirely.

How to deauthorize a token:

  1. Go to the CMA tokens admin view.

  2. Select one or more tokens.

  3. Click Deauthorize.

The token remains active for any other orgs it is authorized for. Upon deauthorization:

  • The token owner is notified.

  • All org admins and owners that deauthorized tokens are notified as a safety precaution.

This gives you fine-grained control over token access without disrupting users or workflows in other orgs.

Wenn Sie ein Personal Access Token erstellen, empfehlen wir Ihnen, ein Ablaufdatum für Ihr Token festzulegen. Wenn das Ablaufdatum Ihres Tokens erreicht ist, wird es automatisch widerrufen. Fügen Sie ein Ablaufdatum hinzu, um die Fähigkeit Ihres Unternehmens zu erhöhen, den Zugriff auf Ihre Daten zu sichern.

Content Management API tokens are just like passwords. Anyone getting it could use it to use Contentful on your behalf so you should make your best to protect them. Typical measures you would need to take include referring to environment variables as much as possible, and adding to your VCS ignore list any file where a token is mentioned to ensure such couldn’t be leaked.

HINWEIS: Sie können kein Ablaufdatum für vorhandene Token festlegen. 

To add an expiration date on a Personal Access Token, you must create a new token. Click the Create personal access token button at the top right corner of the CMA tokens page. In the modal, enter the name of the new token and choose an expiration date from the dropdown. Click Generate to create the new token.

When a token is approaching expiration, individuals who created the token will receive email notifications with guidance on how to create a new token. However, tokens with an expiration time of less than 1 day will not receive an email notification.

When creating a personal access token, an expiration should be set for your token. Upon reaching your token's expiration date, it is automatically revoked. Expiration dates increase your organization's ability to secure how your data is accessed and ensure proper maintenance of your tokens.

Dies hängt stark von Ihrem Anwendungsfall ab. OAuth-Apps ermöglichen es anderen Nutzer*innen, sich bei Contentful zu authentifizieren, damit Ihre App das ausgegebene Token als Teil ihres Prozesses verwenden kann. Personal Access Tokens sind persönlich, was bedeutet, dass sie an ein einzelnes Contentful Nutzerkonto gebunden sind. Dies macht Personal Access Tokens zu guten Kandidat*innen für Entwicklungs- und Automatisierungszwecke, wenn eine Anwendung nur ein einzelnes Contentful Konto zur Verwaltung von Content benötigt.

Im Grunde genommen ähneln sie sich, da es sich bei beiden um Token für den Zugriff auf die Contentful Content Management API handelt. Beide sind an den/die Nutzer*in gebunden, der/die sie angefordert hat, und geben daher Zugriff auf die gleichen Unternehmen, Spaces und den gleichen Content wie der/die Owner*in des Tokens.

Der Unterschied ist eher konzeptionell: Mit OAuth autorisieren Sie eine App, in Ihrem Namen mit Contentful zu kommunizieren, und sehen möglicherweise nie die Anmeldeinformationen, die die App verwendet. Mit Personal Access Tokens sind Sie hingegen dafür verantwortlich, die Anmeldeinformationen für die API anzufordern und anschließend zu verwalten.

Weil sie eine einfache Möglichkeit bieten, mit unserer Content Management API zu arbeiten, und ein weit verbreiteter Standard sind, der in bekannten Unternehmen und Diensten (wie zum Beispiel Github) verwendet wird.