---
title: Get client-side security settings
---

[Skip to content](#%5Ftop) 

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

[Page Shield](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Get client-side security settings

client.pageShield.get(PageShieldGetParams { zone\_id } params, RequestOptionsoptions?): [PageShieldGetResponse](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield#%28resource%29%20page%5Fshield%20%3E%20%28model%29%20page%5Fshield%5Fget%5Fresponse%20%3E%20%28schema%29) { enabled, updated\_at, use\_cloudflare\_reporting\_endpoint, use\_connection\_url\_path } | null

GET/zones/{zone\_id}/page\_shield

Returns the client-side security product enablement status and reporting behaviors.

##### Security

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)

`Page Shield` `Domain Page Shield Read` `Domain Page Shield` `Page Shield Read` `Zone Settings Write` `Zone Settings Read`

##### ParametersExpand Collapse 

params: PageShieldGetParams { zone\_id } 

zone\_id: string

Identifier

maxLength32

##### ReturnsExpand Collapse 

PageShieldGetResponse { enabled, updated\_at, use\_cloudflare\_reporting\_endpoint, use\_connection\_url\_path } 

enabled: boolean

When true, indicates that Client-Side Security is enabled.

updated\_at: string

The timestamp of when Client-Side Security was last updated.

use\_cloudflare\_reporting\_endpoint: boolean

When true, CSP reports will be sent to <https://csp-reporting.cloudflare.com/cdn-cgi/script%5Fmonitor/report>

use\_connection\_url\_path: boolean

When true, the paths associated with connections URLs will also be analyzed.

### Get client-side security settings

TypeScript

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
import Cloudflare from 'cloudflare';

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

const pageShield = await client.pageShield.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' });

console.log(pageShield.enabled);
```

200 example

```
{
  "success": true,
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "enabled": true,
    "updated_at": "2022-10-12T17:56:52.083582+01:00",
    "use_cloudflare_reporting_endpoint": true,
    "use_connection_url_path": true
  }
}
```

##### Returns Examples

200 example

```
{
  "success": true,
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "enabled": true,
    "updated_at": "2022-10-12T17:56:52.083582+01:00",
    "use_cloudflare_reporting_endpoint": true,
    "use_connection_url_path": true
  }
}
```