Skip to main content
Configures the authentication method for an integration. This sets how users connect to the external service — via API key, OAuth, service account, or no authentication.

Before You Start

  • Changing authType: Changing the authType deletes all existing user connections to this integration. Users will need to reconnect.

Base URL

Dedicated deploymentsReplace api.langdock.com with <your-deployment-url>/api/public in all requests.

Required Scopes

This endpoint requires the INTEGRATION_API scope.

Parameters

Path Parameters

Request Body

Auth Types

OAUTH_DCR and OAUTH_CIMD are used by MCP integrations and can’t be set through this endpoint. Requests with either value return 400.

Auth Field Schema

Each auth field defines a credential input that users fill in when connecting to the integration.
The slug must be unique within the integration. The field id is auto-generated — do not include it in the request.

Field Types

OAuth Client Schema

Only relevant when authType is OAUTH. Your authorizationCode and accessTokenCode scripts receive PKCE values. See Authorization Code with PKCE.
OAuth credentials (clientId, clientSecret, authUrl, tokenUrl) are write-only — they are never returned in API responses.

Example: API Key Authentication

Response Format

Success Response (200 OK)

Behavior

  • Auth fields are fully replaced on every call — the entire array is deleted and recreated.
  • Changing authType deletes all existing user connections and any previous OAuth client configuration.
  • Setting authType to NONE, API_KEY, or SERVICE_ACCOUNT deletes any existing OAuth client.
  • OAuth credentials (clientId, clientSecret) are encrypted before storage.
  • authFieldValues replaces stored defaults on OAUTH when you send it. Omit the property to keep the stored values. Unknown or empty keys are dropped.
  • PASSWORD values are encrypted and returned as ***********. Send that mask to keep the stored secret. Other values return as text. The response omits authFieldValues when nothing is stored.

Error Handling

Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.