Skip to content
Start here

List OAuth Clients

client.iam.oauthClients.list(OAuthClientListParams { account_id } params, RequestOptionsoptions?): SinglePage<OAuthClientListResponse { client_id, visibility, allowed_cors_origins, 16 more } >
GET/accounts/{account_id}/oauth_clients

List all OAuth clients for an account.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
OAuth Client Read
ParametersExpand Collapse
params: OAuthClientListParams { account_id }
account_id: string

Account identifier tag.

maxLength32
minLength32
ReturnsExpand Collapse
OAuthClientListResponse { client_id, visibility, allowed_cors_origins, 16 more }

Fields shared by OAuth client responses and create/update requests.

client_id: string

The unique identifier for an OAuth client.

visibility: "public" | "private"

Visibility of the OAuth client.

One of the following:
"public"
"private"
allowed_cors_origins?: Array<string>

Array of allowed CORS origins.

client_name?: string

Human-readable name of the OAuth client.

client_uri?: string

URL of the home page of the client.

client_uri_verification?: ClientURIVerification { status, text }

Client URI domain control verification state.

status?: "pending" | "in_progress" | "verified" | "failed"

Current verification status for the client URI host.

One of the following:
"pending"
"in_progress"
"verified"
"failed"
text?: string

Exact TXT record value that must be added to DNS to prove ownership of the client URI host.

created_at?: string

Timestamp when the OAuth client was created.

formatdate-time
grant_types?: Array<"authorization_code" | "refresh_token">

Array of OAuth grant types the client is allowed to use. authorization_code is required; refresh_token may be included optionally.

One of the following:
"authorization_code"
"refresh_token"
has_rotated_secret?: boolean

Indicates whether the client has a rotated secret that has not yet been deleted.

logo_uri?: string

URL of the client’s logo.

policy_uri?: string

URL that points to a privacy policy document.

post_logout_redirect_uris?: Array<string>

Array of allowed post-logout redirect URIs.

redirect_uris?: Array<string>

Array of allowed redirect URIs for the client.

response_types?: Array<"token" | "id_token" | "code">

Array of OAuth response types the client is allowed to use.

One of the following:
"token"
"id_token"
"code"
scopes?: Array<string>

Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes offline_access and openid are added or removed automatically based on grant_types and response_types.

token_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_post"

The authentication method the client uses at the token endpoint.

One of the following:
"none"
"client_secret_basic"
"client_secret_post"
tos_uri?: string

URL that points to a terms of service document.

updated_at?: string

Timestamp when the OAuth client was last updated.

formatdate-time

List OAuth Clients

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const oauthClientListResponse of client.iam.oauthClients.list({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
})) {
  console.log(oauthClientListResponse.client_id);
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "client_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
      "visibility": "private",
      "allowed_cors_origins": [
        "https://example.com"
      ],
      "client_name": "My OAuth App",
      "client_uri": "https://example.com",
      "client_uri_verification": {
        "status": "in_progress",
        "text": "cloudflare_oauth_client_publisher=example"
      },
      "created_at": "2025-01-01T00:00:00Z",
      "grant_types": [
        "authorization_code",
        "refresh_token"
      ],
      "has_rotated_secret": false,
      "logo_uri": "https://example.com/logo.png",
      "policy_uri": "https://example.com/privacy",
      "post_logout_redirect_uris": [
        "https://example.com/logout"
      ],
      "promoted_at": "2026-05-13T12:00:00Z",
      "redirect_uris": [
        "https://example.com/callback"
      ],
      "response_types": [
        "code"
      ],
      "scopes": [
        "account.read"
      ],
      "token_endpoint_auth_method": "client_secret_post",
      "tos_uri": "https://example.com/tos",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "client_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
      "visibility": "private",
      "allowed_cors_origins": [
        "https://example.com"
      ],
      "client_name": "My OAuth App",
      "client_uri": "https://example.com",
      "client_uri_verification": {
        "status": "in_progress",
        "text": "cloudflare_oauth_client_publisher=example"
      },
      "created_at": "2025-01-01T00:00:00Z",
      "grant_types": [
        "authorization_code",
        "refresh_token"
      ],
      "has_rotated_secret": false,
      "logo_uri": "https://example.com/logo.png",
      "policy_uri": "https://example.com/privacy",
      "post_logout_redirect_uris": [
        "https://example.com/logout"
      ],
      "promoted_at": "2026-05-13T12:00:00Z",
      "redirect_uris": [
        "https://example.com/callback"
      ],
      "response_types": [
        "code"
      ],
      "scopes": [
        "account.read"
      ],
      "token_endpoint_auth_method": "client_secret_post",
      "tos_uri": "https://example.com/tos",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}