Skip to content

Integrations

Contentful

Set up Contentful OAuth for headless CMS content management

Connect the application’s users to Contentful for headless CMS content management, content delivery, and space administration.

PropertyValue
Provider IDcontentful
CategoryDeveloper Tools
PKCESupported
Token refreshAutomatic
Redirect URIShown in Developer Portal

The GraphQL Content API is read-only and generated per space. Alter classifies GET and POST on /content/v1/spaces/{space_id} and /content/v1/spaces/{space_id}/environments/{environment_id} as aggregate read operations on graphql.contentful.com and graphql.eu.contentful.com. Policies can target the route and space/environment; individual content-model root fields are not separately classified.

Newly created rules or rules whose body changes use these read families: a read deny applies, while a delete or write deny permits the read. Pre-existing rules retain their prior unclassified-route decisions, including fail-closed family denies and read allowlists. Identical rule-body submissions preserve the prior meaning.

Rules that name Contentful REST operation IDs reach the GraphQL routes as follows:

  • REST read rules cover GraphQL reads. A deny or approval rule naming a read REST operation (for example cda/entries/list, cda/entries/get or cma/spaces/get) also applies to all four GraphQL routes, because a GraphQL query can read the same content.
  • REST write, delete and publish rules do not. A rule naming cma/entries/update, cma/entries/delete, cma/entries/publish or any other non-read REST operation does not apply to GraphQL, because the GraphQL Content API cannot change content.
  • Parameter conditions on read rules. A read rule with parameter conditions reaches GraphQL only when its REST operation shares the space (or environment) path parameter. GraphQL requests carry only space_id, and environment_id on the environment routes. A condition on a parameter the GraphQL request does not carry (for example entry_id, or environment_id on a space route) cannot be judged on that request, so the rule fails closed there: a deny denies every GraphQL read, and an approval rule denies instead of asking. Saving such a rule returns a warning that names the parameter.
  • Allowlists. REST IDs never grant GraphQL access through an operation allowlist; name the exact graphql/space/get, graphql/space/post, graphql/environment/get or graphql/environment/post ID, or allow the read family.

The provider requires a Content Delivery access token for published content, or a Content Preview access token when the query includes unpublished content, with access to the requested space and environment (authentication and preview requirements). Classification does not grant an OAuth token additional API access.

Go to Contentful OAuth Applications

Navigate to Contentful account settings and go to OAuth applications.

Create a new application

Click New Application.

Configure the application

Enter the application name and description.

Add the redirect URI

Add the Redirect URI from the Developer Portal to the Redirect URI field.

Get credentials

Copy the Client ID and Client Secret.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Contentful provider

Go to OAuth Providers > Add Provider > Contentful.

Enter credentials

  • Client ID: Paste the Contentful Client ID
  • Client Secret: Paste the Contentful Client Secret

Select scopes

Choose the scopes the application needs.

Save

Click Save. The provider is now active.

ScopeDescription
content_management_manageFull access to the Content Management API
content_management_readRead-only access to the Content Management API
  • The content_management_manage scope is included by default and provides full read/write access.
  • Use content_management_read if the application only needs to read content.
  • See the Contentful authentication documentation for more details.

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
graphql/space/getreadGET/content/v1/spaces/{space_id}
graphql/environment/getreadGET/content/v1/spaces/{space_id}/environments/{environment_id}
graphql/space/postreadPOST/content/v1/spaces/{space_id}
graphql/environment/postreadPOST/content/v1/spaces/{space_id}/environments/{environment_id}
cma/assets/publishsendPUT/spaces/{space_id}/environments/{environment_id}/assets/{asset_id}/published
cma/entries/publishsendPUT/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}/published
cma/entries/deletedeleteDELETE/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}
cma/entries/unpublishdeleteDELETE/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}/published
cma/assets/createwritePOST/spaces/{space_id}/environments/{environment_id}/assets
cma/assets/processwritePUT/spaces/{space_id}/environments/{environment_id}/assets/{asset_id}/files/{locale}/process
cma/entries/createwritePOST/spaces/{space_id}/environments/{environment_id}/entries
cma/entries/updatewritePUT/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}
cda/assets/getreadGET/spaces/{space_id}/environments/{environment_id}/assets/{asset_id}
cda/assets/listreadGET/spaces/{space_id}/environments/{environment_id}/assets
cda/content-types/listreadGET/spaces/{space_id}/environments/{environment_id}/content_types
cda/entries/getreadGET/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}
cda/entries/listreadGET/spaces/{space_id}/environments/{environment_id}/entries
cda/locales/listreadGET/spaces/{space_id}/environments/{environment_id}/locales
cda/syncreadGET/spaces/{space_id}/environments/{environment_id}/sync
cma/spaces/getreadGET/spaces/{space_id}
cma/users/mereadGET/users/me

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.