---
title: List OAuth Clients
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/go)

[IAM](https://developers.cloudflare.com/api/go/resources/iam)

[OAuth Clients](https://developers.cloudflare.com/api/go/resources/iam/subresources/oauth%5Fclients)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# List OAuth Clients

client.IAM.OAuthClients.List(ctx, query) (\*SinglePage\[[OAuthClientListResponse](https://developers.cloudflare.com/api/go/resources/iam#%28resource%29%20iam.oauth%5Fclients%20%3E%20%28model%29%20OAuthClientListResponse%20%3E%20%28schema%29)\], error)

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](https://developers.cloudflare.com/fundamentals/api/get-started/create-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 

query OAuthClientListParams

AccountID param.Field\[string\]

Account identifier tag.

maxLength32

minLength32

##### ReturnsExpand Collapse 

type OAuthClientListResponse struct{…}

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

ClientID string

The unique identifier for an OAuth client.

Visibility OAuthClientListResponseVisibility

Visibility of the OAuth client.

One of the following:

const OAuthClientListResponseVisibilityPublic OAuthClientListResponseVisibility \= "public"

const OAuthClientListResponseVisibilityPrivate OAuthClientListResponseVisibility \= "private"

AllowedCORSOrigins \[\]stringOptional

Array of allowed CORS origins.

ClientName stringOptional

Human-readable name of the OAuth client.

ClientURI stringOptional

URL of the home page of the client.

ClientURIVerification OAuthClientListResponseClientURIVerificationOptional

Client URI domain control verification state.

Status OAuthClientListResponseClientURIVerificationStatusOptional

Current verification status for the client URI host.

One of the following:

const OAuthClientListResponseClientURIVerificationStatusPending OAuthClientListResponseClientURIVerificationStatus \= "pending"

const OAuthClientListResponseClientURIVerificationStatusInProgress OAuthClientListResponseClientURIVerificationStatus \= "in\_progress"

const OAuthClientListResponseClientURIVerificationStatusVerified OAuthClientListResponseClientURIVerificationStatus \= "verified"

const OAuthClientListResponseClientURIVerificationStatusFailed OAuthClientListResponseClientURIVerificationStatus \= "failed"

Text stringOptional

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

CreatedAt TimeOptional

Timestamp when the OAuth client was created.

formatdate-time

GrantTypes \[\]OAuthClientListResponseGrantTypeOptional

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:

const OAuthClientListResponseGrantTypeAuthorizationCode OAuthClientListResponseGrantType \= "authorization\_code"

const OAuthClientListResponseGrantTypeRefreshToken OAuthClientListResponseGrantType \= "refresh\_token"

HasRotatedSecret boolOptional

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

LogoURI stringOptional

URL of the client’s logo.

OptionalScopes \[\]stringOptional

Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional.

PolicyURI stringOptional

URL that points to a privacy policy document.

PostLogoutRedirectURIs \[\]stringOptional

Array of allowed post-logout redirect URIs.

PromotedAt TimeOptional

Timestamp when the OAuth client was promoted to public visibility.

formatdate-time

RedirectURIs \[\]stringOptional

Array of allowed redirect URIs for the client.

ResponseTypes \[\]OAuthClientListResponseResponseTypeOptional

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

One of the following:

const OAuthClientListResponseResponseTypeToken OAuthClientListResponseResponseType \= "token"

const OAuthClientListResponseResponseTypeIDToken OAuthClientListResponseResponseType \= "id\_token"

const OAuthClientListResponseResponseTypeCode OAuthClientListResponseResponseType \= "code"

Scopes \[\]stringOptional

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`.

TokenEndpointAuthMethod OAuthClientListResponseTokenEndpointAuthMethodOptional

The authentication method the client uses at the token endpoint.

One of the following:

const OAuthClientListResponseTokenEndpointAuthMethodNone OAuthClientListResponseTokenEndpointAuthMethod \= "none"

const OAuthClientListResponseTokenEndpointAuthMethodClientSecretBasic OAuthClientListResponseTokenEndpointAuthMethod \= "client\_secret\_basic"

const OAuthClientListResponseTokenEndpointAuthMethodClientSecretPost OAuthClientListResponseTokenEndpointAuthMethod \= "client\_secret\_post"

TosURI stringOptional

URL that points to a terms of service document.

UpdatedAt TimeOptional

Timestamp when the OAuth client was last updated.

formatdate-time

### List OAuth Clients

Go

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/iam"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.IAM.OAuthClients.List(context.TODO(), iam.OAuthClientListParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}

```

200 example

```
{
  "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",
      "optional_scopes": [
        "account.write"
      ],
      "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

200 example

```
{
  "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",
      "optional_scopes": [
        "account.write"
      ],
      "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
  }
}
```