Update OAuth Client
Update an existing OAuth client. Only include fields you want to update.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Accepted Permissions (at least one required)
Path Parameters
Body ParametersJSON
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.
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.
Update OAuth Client
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/oauth_clients/$OAUTH_CLIENT_ID \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"allowed_cors_origins": [
"https://example.com"
],
"client_name": "My OAuth App",
"client_uri": "https://example.com",
"grant_types": [
"authorization_code",
"refresh_token"
],
"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"
],
"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",
"visibility": "public"
}'{
"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"
}
}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",
"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"
}
}