List OAuth Clients
client.IAM.OAuthClients.List(ctx, query) (*SinglePage[OAuthClientListResponse], 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.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
List OAuth Clients
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)
}
{
"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
}
}