---
title: List token validation configurations
---

[Skip to content](#_top)

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

[Token Validation](https://developers.cloudflare.com/api/go/resources/token_validation)

[Configuration](https://developers.cloudflare.com/api/go/resources/token_validation/subresources/configuration)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List token validation configurations

client.TokenValidation.Configuration.List(ctx, params) (\*V4PagePaginationArray\[[TokenConfig](<https://developers.cloudflare.com/api/go/resources/token_validation#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/token\_validation/config

Lists the JWT validation configurations defined for the zone.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Account API Gateway``Account API Gateway Read``Domain API Gateway``Domain API Gateway Read`

##### ParametersExpand Collapse

<details>

<summary>

params ConfigurationListParams

</summary>

ZoneID param.Field\[string]

Path param: Identifier.

maxLength32

<a href="#(resource)%20token_validation.configuration%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

Page param.Field\[int64]Optional

Query param: Page number of paginated results.

minimum1

<a href="#(resource)%20token_validation.configuration%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page">Link to this property</a>

PerPage param.Field\[int64]Optional

Query param: Maximum number of results per page.

maximum50

minimum5

<a href="#(resource)%20token_validation.configuration%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20per_page">Link to this property</a>

</details>

[Link to this property](<#(resource)%20token_validation.configuration%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type TokenConfig struct{…}

</summary>

ID string

UUID.

maxLength36

minLength36

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

<details>

<summary>

Credentials TokenConfigCredentials

</summary>

<details>

<summary>

Keys \[]TokenConfigCredentialsKey

</summary>

One of the following:

<details>

<summary>

type TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSA struct{…}

JSON representation of an RSA key.

</summary>

<details>

<summary>

Alg TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlg

Algorithm

</summary>

One of the following:

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlgRs256 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlg = "RS256"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20alg%20%3E%20(member)%200">Link to this property</a>

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlgRs384 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlg = "RS384"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20alg%20%3E%20(member)%201">Link to this property</a>

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlgRs512 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlg = "RS512"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20alg%20%3E%20(member)%202">Link to this property</a>

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlgPs256 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlg = "PS256"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20alg%20%3E%20(member)%203">Link to this property</a>

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlgPs384 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlg = "PS384"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20alg%20%3E%20(member)%204">Link to this property</a>

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlgPs512 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAAlg = "PS512"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20alg%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20alg">Link to this property</a>

E string

RSA exponent

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20e">Link to this property</a>

Kid string

Key ID

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20kid">Link to this property</a>

Kty TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyRSAKty

Key Type

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20kty">Link to this property</a>

N string

RSA modulus

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20n">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

type TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs256 struct{…}

JSON representation of an ES256 key

</summary>

Alg TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs256Alg

Algorithm

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20alg">Link to this property</a>

Crv TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs256Crv

Curve

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20crv">Link to this property</a>

Kid string

Key ID

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20kid">Link to this property</a>

Kty TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs256Kty

Key Type

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20kty">Link to this property</a>

X string

X EC coordinate

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20x">Link to this property</a>

Y string

Y EC coordinate

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20y">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

type TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs384 struct{…}

JSON representation of an ES384 key

</summary>

Alg TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs384Alg

Algorithm

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20alg">Link to this property</a>

Crv TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs384Crv

Curve

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20crv">Link to this property</a>

Kid string

Key ID

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20kid">Link to this property</a>

Kty TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyEcEs384Kty

Key Type

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20kty">Link to this property</a>

X string

X EC coordinate

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20x">Link to this property</a>

Y string

Y EC coordinate

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20y">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%202">Link to this property</a>

<details>

<summary>

type TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponse struct{…}

JSON representation of a symmetric verification key in API responses (secret material is redacted).

</summary>

<details>

<summary>

Alg TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseAlg

Algorithm

</summary>

One of the following:

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseAlgHs256 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseAlg = "HS256"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20alg%20%3E%20(member)%200">Link to this property</a>

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseAlgHs384 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseAlg = "HS384"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20alg%20%3E%20(member)%201">Link to this property</a>

const TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseAlgHs512 TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseAlg = "HS512"

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20alg%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20alg">Link to this property</a>

Kid string

Key ID

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20kid">Link to this property</a>

Kty TokenConfigCredentialsKeysAPIShieldCredentialsJWTKeyOctResponseKty

Key Type

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20kty">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys%20%3E%20(items)%20%3E%20(variant)%203">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials%20%3E%20(property)%20keys">Link to this property</a>

</details>

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20credentials">Link to this property</a>

Description string

maxLength500

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

LastUpdated Time

formatdate-time

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20last_updated">Link to this property</a>

Title string

maxLength50

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20title">Link to this property</a>

TokenSources \[]string

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20token_sources">Link to this property</a>

TokenType TokenConfigTokenType

<a href="#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)%20%3E%20(property)%20token_type">Link to this property</a>

</details>

[Link to this property](<#(resource)%20token_validation.configuration%20%3E%20(model)%20token_config%20%3E%20(schema)>)

### List token validation configurations

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.TokenValidation.Configuration.List(context.TODO(), token_validation.ConfigurationListParams{
    ZoneID: 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"
      }
    }
  ],
  "result": [
    {
      "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "created_at": "2014-01-01T05:20:00.12345Z",
      "credentials": {
        "keys": [
          {
            "alg": "ES256",
            "crv": "P-256",
            "kid": "38013f13-c266-4eec-a72a-92ec92779f21",
            "kty": "EC",
            "x": "KN53JRwN3wCjm2o39bvZUX2VdrsHzS8pxOAGjm8m7EQ",
            "y": "lnkkzIxaveggz-HFhcMWW15nxvOj0Z_uQsXbpK0GFcY"
          }
        ]
      },
      "description": "Long description for Token Validation Configuration",
      "last_updated": "2014-01-01T05:20:00.12345Z",
      "title": "Example Token Validation Configuration",
      "token_sources": [
        "http.request.headers[\"x-auth\"][0]",
        "http.request.cookies[\"Authorization\"][0]"
      ],
      "token_type": "JWT"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
```

##### 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"
      }
    }
  ],
  "result": [
    {
      "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "created_at": "2014-01-01T05:20:00.12345Z",
      "credentials": {
        "keys": [
          {
            "alg": "ES256",
            "crv": "P-256",
            "kid": "38013f13-c266-4eec-a72a-92ec92779f21",
            "kty": "EC",
            "x": "KN53JRwN3wCjm2o39bvZUX2VdrsHzS8pxOAGjm8m7EQ",
            "y": "lnkkzIxaveggz-HFhcMWW15nxvOj0Z_uQsXbpK0GFcY"
          }
        ]
      },
      "description": "Long description for Token Validation Configuration",
      "last_updated": "2014-01-01T05:20:00.12345Z",
      "title": "Example Token Validation Configuration",
      "token_sources": [
        "http.request.headers[\"x-auth\"][0]",
        "http.request.cookies[\"Authorization\"][0]"
      ],
      "token_type": "JWT"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
```