---
title: "Create an OAuth2 client credentials auth method"
method: POST
path: "/api/v2/integration/webhooks/configuration/auth-method/oauth2-client-credentials"
tags: ["Webhooks Integration"]
---

# Create an OAuth2 client credentials auth method

`POST /api/v2/integration/webhooks/configuration/auth-method/oauth2-client-credentials`

Create a new OAuth2 client credentials auth method for the Webhooks
integration. The `client_secret` is stored securely and never returned.

## Request body

- WebhooksOAuth2ClientCredentialsCreateRequest — Create request for an OAuth2 client credentials auth method.
  - `data` WebhooksOAuth2ClientCredentialsCreateData, required — OAuth2 client credentials data for a create request.
    - `attributes` WebhooksOAuth2ClientCredentialsCreateAttributes, required — OAuth2 client credentials attributes for a create request.
      - `access_token_url` string, required — URL of the OAuth2 access token endpoint.
      - `audience` string, nullable — The intended audience for the OAuth2 access token.
      - `client_id` string, required — The OAuth2 client ID issued by the authorization server.
      - `client_secret` string, required — The OAuth2 client secret issued by the authorization server. Write-only; never returned by the API.
      - `name` string, required — Human-readable name for this auth method. Must be unique within your organization.
      - `scope` string, nullable — Space-separated list of OAuth2 scopes to request.
    - `type` 'webhooks-auth-method-oauth2-client-credentials', required — OAuth2 client credentials resource type.

## Response `201`

CREATED

- WebhooksOAuth2ClientCredentialsResponse — Response containing an OAuth2 client credentials auth method.
  - `data` WebhooksOAuth2ClientCredentialsResponseData, required — OAuth2 client credentials data from a response.
    - `attributes` WebhooksOAuth2ClientCredentialsResponseAttributes, required — OAuth2 client credentials attributes returned by the API. The `client_secret` is never echoed.
      - `access_token_url` string — URL of the OAuth2 access token endpoint.
      - `audience` string, nullable — The intended audience for the OAuth2 access token.
      - `client_id` string — The OAuth2 client ID issued by the authorization server.
      - `name` string — Human-readable name for this auth method.
      - `protocol` 'oauth2-client-credentials' — Authentication protocol used by the auth method.
      - `scope` string, nullable — Space-separated list of OAuth2 scopes to request.
    - `id` string, required — The ID of the OAuth2 client credentials auth method.
    - `type` 'webhooks-auth-method-oauth2-client-credentials', required — OAuth2 client credentials resource type.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `409` — Conflict
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
