> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. # Create an OAuth application POST https://api.contentful.com/users/{user_id}/oauth_applications Content-Type: application/vnd.contentful.management.v1+json This endpoint creates a new OAuth application. Reference: https://contentful.com/developers/docs/references/content-management-api/oauth-applications/create-an-o-auth-application ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `user_id` (string, required) — ID of the user in form of a string ### Body (application/vnd.contentful.management.v1+json) This endpoint expects a map from string to any. - `map from string to any` ## Response ### 200 OK - Request successful - `map from string to any` ## Examples **Request** ```json { "confidential": true, "description": "My OAuth Application Description", "name": "My OAuth Application", "redirectUri": "https://redirect.uri.com", "scopes": [ "content_management_manage" ] } ``` **Response** ```json { "clientId": "pCEicdinud1qEh9qXwIsbdjYEwHnPdbtbJ2iBfusghdj", "clientSecret": "JdGHtinud1qEh9qXwIOzjYEwHnPdbtbJ2iBfaj9hs", "confidential": true, "description": "My OAuth Application Description", "name": "My OAuth Application", "redirectUri": "https://redirect.uri.com", "scopes": [ "content_management_manage" ], "sys": { "createdAt": "2025-01-10T11:29:46.809Z", "id": "exampleOAuthApplicationId", "lastUsedAt": null, "type": "Application", "updatedAt": "2025-01-10T11:29:46.809Z", "version": 0 } } ``` **SDK Code** ```android Android SDK currently doesn't implement this endpoint. ``` ```java Java SDK currently doesn't implement this endpoint. ``` ```kotlin Kotlin SDK currently doesn't implement this endpoint. ``` ```swift Swift We currently don't provide a CMA SDK for this platform. ``` ```js-legacy JavaScript (legacy) import { createClient } from 'contentful-management' const client = createClient({ accessToken: '' }, { type: 'legacy' }) client.createOAuthApplication({userId: ''}, {name: '', description: '', scopes: ['scope'], redirectUri: '', confidential: ''}) .then((oauthApplication) => console.log(oauthApplication)) .catch(console.error) ``` ```javascript JavaScript import { createClient } from 'contentful-management' // Client init const client = createClient({ accessToken: '' }) await client.oauthApplication.create({userId: ''}, {name: '', description: '', scopes: ['scope'], redirectUri: '', confidential: ''}) ``` ```php PHP SDK currently doesn't implement this endpoint. ``` ```ruby Ruby SDK currently doesn't implement this endpoint. ``` ```python Python SDK currently doesn't implement this endpoint. ``` ```.net .NET SDK currently doesn't implement this endpoint. ```