---
title: Get OAuth2 well-known sites
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > OAuth2 Client Public
---

# Get OAuth2 well-known sites{% #get-oauth2-well-known-sites %}
Copy pageCopied
{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/oauth2/.well-known/sites |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/oauth2/.well-known/sites |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/oauth2/.well-known/sites      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/oauth2/.well-known/sites      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/oauth2/.well-known/sites  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/oauth2/.well-known/sites     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/oauth2/.well-known/sites |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/oauth2/.well-known/sites |

### Overview

Retrieve the list of public OAuth2 sites available for the current environment. This endpoint is used for OAuth2 discovery and returns sites where users can authenticate.

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response payload containing the list of public OAuth2 sites for discovery.

| Parent field | Field                        | Type     | Description                                                                                |
| ------------ | ---------------------------- | -------- | ------------------------------------------------------------------------------------------ |
|              | data [*required*]       | object   | Data object containing OAuth2 well-known sites information.                                |
| data         | attributes [*required*] | object   | Attributes containing the list of public OAuth2 sites.                                     |
| attributes   | sites [*required*]      | [string] | Array of public OAuth2 site URLs for the environment.                                      |
| data         | id [*required*]         | string   | Environment identifier.                                                                    |
| data         | type [*required*]       | enum     | JSON:API resource type for OAuth2 well-known sites environment. Allowed enum values: `env` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "sites": [
        "datadoghq.com",
        "datadoghq.eu",
        "us5.datadoghq.com",
        "us3.datadoghq.com",
        "ap1.datadoghq.com",
        "ap2.datadoghq.com"
      ]
    },
    "id": "prod",
    "type": "env"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/oauth2/.well-known/sites" \
-H "Accept: application/json" 
                
{% /tab %}
