Skip to content
Start here

OAuth Clients

resource cloudflare_oauth_client

required Expand Collapse
account_id: String

Account identifier tag.

client_name: String

Human-readable name of the OAuth client.

token_endpoint_auth_method: String

The authentication method the client uses at the token endpoint.

grant_types: List[String]

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

redirect_uris: List[String]

Array of allowed redirect URIs for the client.

response_types: List[String]

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

scopes: List[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.

optional Expand Collapse
oauth_client_id?: String

The unique identifier for an OAuth client.

client_uri?: String

URL of the home page of the client.

logo_uri?: String

URL of the client’s logo.

policy_uri?: String

URL that points to a privacy policy document.

tos_uri?: String

URL that points to a terms of service document.

visibility?: String

Promote the OAuth client from private to public visibility. Only public is accepted; demotion to private is not supported. Promotion requires a non-empty client name, logo URI, verified client URI host, and at least one non-identity scope.

allowed_cors_origins?: List[String]

Array of allowed CORS origins.

post_logout_redirect_uris?: List[String]

Array of allowed post-logout redirect URIs.

computed Expand Collapse
client_id: String

The unique identifier for an OAuth client.

client_secret: String

The client secret. This is the only time the secret is returned in a response.

created_at: Time

Timestamp when the OAuth client was created.

has_rotated_secret: Bool

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

updated_at: Time

Timestamp when the OAuth client was last updated.

client_uri_verification: Attributes

Client URI domain control verification state.

status: String

Current verification status for the client URI host.

text: String

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

cloudflare_oauth_client

resource "cloudflare_oauth_client" "example_oauth_client" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  client_name = "My OAuth App"
  grant_types = ["authorization_code", "refresh_token"]
  redirect_uris = ["https://example.com/callback"]
  response_types = ["code"]
  scopes = ["account.read"]
  token_endpoint_auth_method = "client_secret_post"
  allowed_cors_origins = ["https://example.com"]
  client_uri = "https://example.com"
  logo_uri = "https://example.com/logo.png"
  policy_uri = "https://example.com/privacy"
  post_logout_redirect_uris = ["https://example.com/logout"]
  tos_uri = "https://example.com/tos"
}

data cloudflare_oauth_client

required Expand Collapse
account_id: String

Account identifier tag.

oauth_client_id: String

The unique identifier for an OAuth client.

computed Expand Collapse
client_id: String

The unique identifier for an OAuth client.

client_name: String

Human-readable name of the OAuth client.

client_uri: String

URL of the home page of the client.

created_at: Time

Timestamp when the OAuth client was created.

has_rotated_secret: Bool

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.

token_endpoint_auth_method: String

The authentication method the client uses at the token endpoint.

tos_uri: String

URL that points to a terms of service document.

updated_at: Time

Timestamp when the OAuth client was last updated.

visibility: String

Visibility of the OAuth client.

allowed_cors_origins: List[String]

Array of allowed CORS origins.

grant_types: List[String]

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

post_logout_redirect_uris: List[String]

Array of allowed post-logout redirect URIs.

redirect_uris: List[String]

Array of allowed redirect URIs for the client.

response_types: List[String]

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

scopes: List[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.

client_uri_verification: Attributes

Client URI domain control verification state.

status: String

Current verification status for the client URI host.

text: String

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

cloudflare_oauth_client

data "cloudflare_oauth_client" "example_oauth_client" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  oauth_client_id = "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}

data cloudflare_oauth_clients

required Expand Collapse
account_id: String

Account identifier tag.

optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

client_id: String

The unique identifier for an OAuth client.

visibility: String

Visibility of the OAuth client.

allowed_cors_origins: List[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: Attributes

Client URI domain control verification state.

status: String

Current verification status for the client URI host.

text: String

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

created_at: Time

Timestamp when the OAuth client was created.

grant_types: List[String]

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

has_rotated_secret: Bool

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: List[String]

Array of allowed post-logout redirect URIs.

redirect_uris: List[String]

Array of allowed redirect URIs for the client.

response_types: List[String]

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

scopes: List[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: String

The authentication method the client uses at the token endpoint.

tos_uri: String

URL that points to a terms of service document.

updated_at: Time

Timestamp when the OAuth client was last updated.

cloudflare_oauth_clients

data "cloudflare_oauth_clients" "example_oauth_clients" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
}