---
title: Get OAuth2 well-known sites
description: Retrieve the list of public OAuth2 sites available for the current environment.
breadcrumbs: Documentation > API > Get OAuth2 well-known sites
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/llms.txt).

# Get OAuth2 well-known sites

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| 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 |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/oauth2/.well-known/sites      |
| 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 |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/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  |

### 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

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="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`. Default: `env`. |
{% /tab %}

{% tab label="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 %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com

curl -X GET "https://api.${DD_SITE}/api/v2/oauth2/.well-known/sites" \
-H "Accept: application/json"
```
{% /tab %}
{% /tabs %}
