For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/es/api/latest/oauth2-client-public/register-an-oauth2-client.md. A documentation index is available at /llms.txt.
Language
Datadog site

Register an OAuth2 client

ADVERTENCIANote: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/oauth2/registerhttps://api.us3.datadoghq.com/api/v2/oauth2/registerhttps://api.us5.datadoghq.com/api/v2/oauth2/registerhttps://api.datadoghq.eu/api/v2/oauth2/registerhttps://api.ap1.datadoghq.com/api/v2/oauth2/registerhttps://api.ap2.datadoghq.com/api/v2/oauth2/registerhttps://api.uk1.datadoghq.com/api/v2/oauth2/registerhttps://api.ddog-gov.com/api/v2/oauth2/registerhttps://api.us2.ddog-gov.com/api/v2/oauth2/register

Descripción general

Register an OAuth2 client using the Dynamic Client Registration protocol defined in RFC 7591.

Solicitud

Body Data (required)

Campo
Type
Descripción
client_name [required]
string

Human-readable name of the client. Control characters are rejected.

client_uri
string

URL of the home page of the client.

grant_types
[string]

OAuth 2.0 grant types the client may use. Defaults to authorization_code and refresh_token when omitted.

jwks_uri
string

URL referencing the client's JSON Web Key Set.

logo_uri
string

URL referencing a logo for the client.

policy_uri
string

URL pointing to the client's privacy policy.

redirect_uris [required]
[string]

Array of redirection URI strings used by the client in redirect-based flows.

response_types
[string]

OAuth 2.0 response types the client may use. Only code is supported.

scope
string

Space-separated list of scope values the client may request.

token_endpoint_auth_method
string

Requested authentication method for the token endpoint. Only none is supported.

tos_uri
string

URL pointing to the client's terms of service.

Respuesta

Created

Response payload for a successful OAuth2 dynamic client registration as defined by RFC 7591.

Campo
Type
Descripción
client_id [required]
uuid

Unique identifier assigned to the registered client.

client_name [required]
string

Human-readable name of the client.

grant_types [required]
[string]

OAuth 2.0 grant types registered for the client.

redirect_uris [required]
[string]

Redirection URIs registered for the client.

response_types [required]
[string]

OAuth 2.0 response types registered for the client.

token_endpoint_auth_method [required]
string

Authentication method registered for the token endpoint. Always none.

Ejemplo de código

Register an OAuth2 client
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d @- << EOF
{
  "client_name": "Example MCP Client",
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "redirect_uris": [
    "https://example.com/oauth/callback"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "none"
}
EOF