---
title: Tokens
---

[Skip to content](#%5Ftop) 

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

[User](https://developers.cloudflare.com/api/typescript/resources/user)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Tokens

##### [List Tokens](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/methods/list)

client.user.tokens.list(TokenListParams { direction, include\_expired, page, per\_page } query?, RequestOptionsoptions?): V4PagePaginationArray<[Token](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%20%3E%20%28schema%29) { id, condition, expires\_on, 7 more } \>

GET/user/tokens

##### [Token Details](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/methods/get)

client.user.tokens.get(stringtokenID, RequestOptionsoptions?): [Token](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%20%3E%20%28schema%29) { id, condition, expires\_on, 7 more } 

GET/user/tokens/{token\_id}

##### [Create Token](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/methods/create)

client.user.tokens.create(TokenCreateParams { name, policies, condition, 2 more } body, RequestOptionsoptions?): [TokenCreateResponse](https://developers.cloudflare.com/api/typescript/resources/user#%28resource%29%20user.tokens%20%3E%20%28model%29%20token%5Fcreate%5Fresponse%20%3E%20%28schema%29) { id, condition, expires\_on, 8 more } 

POST/user/tokens

##### [Update Token](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/methods/update)

client.user.tokens.update(stringtokenID, TokenUpdateParams { name, policies, condition, 3 more } body, RequestOptionsoptions?): [Token](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%20%3E%20%28schema%29) { id, condition, expires\_on, 7 more } 

PUT/user/tokens/{token\_id}

##### [Delete Token](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/methods/delete)

client.user.tokens.delete(stringtokenID, RequestOptionsoptions?): [TokenDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/user#%28resource%29%20user.tokens%20%3E%20%28model%29%20token%5Fdelete%5Fresponse%20%3E%20%28schema%29) { id } | null

DELETE/user/tokens/{token\_id}

##### [Verify Token](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/methods/verify)

client.user.tokens.verify(RequestOptionsoptions?): [TokenVerifyResponse](https://developers.cloudflare.com/api/typescript/resources/user#%28resource%29%20user.tokens%20%3E%20%28model%29%20token%5Fverify%5Fresponse%20%3E%20%28schema%29) { id, status, expires\_on, not\_before } 

GET/user/tokens/verify

##### ModelsExpand Collapse 

TokenCreateResponse { id, condition, expires\_on, 8 more } 

id?: string

Token identifier tag.

maxLength32

condition?: Condition { request\_ip } 

request\_ip?: RequestIP { in, not\_in } 

Client IP restrictions.

in?: Array<[TokenConditionCIDRList](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%5Fcondition%5Fcidr%5Flist%20%3E%20%28schema%29)\>

List of IPv4/IPv6 CIDR addresses.

not\_in?: Array<[TokenConditionCIDRList](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%5Fcondition%5Fcidr%5Flist%20%3E%20%28schema%29)\>

List of IPv4/IPv6 CIDR addresses.

expires\_on?: string

The expiration time on or after which the JWT MUST NOT be accepted for processing.

formatdate-time

issued\_on?: string

The time on which the token was created.

formatdate-time

last\_used\_on?: string

Last time the token was used.

formatdate-time

modified\_on?: string

Last time the token was modified.

formatdate-time

name?: string

Token name.

maxLength120

not\_before?: string

The time before which the token MUST NOT be accepted for processing.

formatdate-time

policies?: Array<[TokenPolicy](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%5Fpolicy%20%3E%20%28schema%29) { id, effect, permission\_groups, resources } \>

List of access policies assigned to the token.

id: string

Policy identifier.

effect: "allow" | "deny"

Allow or deny operations against the resources.

One of the following:

"allow"

"deny"

permission\_groups: Array<PermissionGroup\>

A set of permission groups that are specified to the policy.

id: string

Identifier of the permission group.

meta?: Meta { key, value } 

Attributes associated to the permission group.

key?: string

value?: string

name?: string

Name of the permission group.

resources: Record<string, string\> | Record<string, Record<string, string\>\>

A list of resource names that the policy applies to.

One of the following:

Record<string, string\>

Record<string, Record<string, string\>\>

status?: "active" | "disabled" | "expired"

Status of the token.

One of the following:

"active"

"disabled"

"expired"

value?: [TokenValue](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%5Fvalue%20%3E%20%28schema%29)

The token value.

maxLength80

minLength40

TokenDeleteResponse { id } 

id: string

Identifier

maxLength32

minLength32

TokenVerifyResponse { id, status, expires\_on, not\_before } 

id: string

Token identifier tag.

maxLength32

status: "active" | "disabled" | "expired"

Status of the token.

One of the following:

"active"

"disabled"

"expired"

expires\_on?: string

The expiration time on or after which the JWT MUST NOT be accepted for processing.

formatdate-time

not\_before?: string

The time before which the token MUST NOT be accepted for processing.

formatdate-time

#### TokensPermission Groups

##### [List Token Permission Groups](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/subresources/permission%5Fgroups/methods/list)

client.user.tokens.permissionGroups.list(PermissionGroupListParams { name, scope } query?, RequestOptionsoptions?): SinglePage<[PermissionGroupListResponse](https://developers.cloudflare.com/api/typescript/resources/user#%28resource%29%20user.tokens.permission%5Fgroups%20%3E%20%28model%29%20permission%5Fgroup%5Flist%5Fresponse%20%3E%20%28schema%29) { id, category, name, scopes } \>

GET/user/tokens/permission\_groups

##### ModelsExpand Collapse 

PermissionGroupListResponse { id, category, name, scopes } 

id?: string

Public ID.

category?: "developer\_platform" | "ai\_and\_machine\_learning" | "dns\_and\_zones" | 10 more

Product category that this permission group belongs to.

One of the following:

"developer\_platform"

"ai\_and\_machine\_learning"

"dns\_and\_zones"

"app\_security"

"rules\_and\_configuration"

"cloudflare\_one\_and\_zero\_trust"

"analytics\_and\_logs"

"network\_services"

"media"

"email\_and\_messaging"

"cache\_and\_performance"

"account\_and\_billing"

"other"

name?: string

Permission Group Name

scopes?: Array<"com.cloudflare.api.account" | "com.cloudflare.api.account.zone" | "com.cloudflare.api.user" | "com.cloudflare.edge.r2.bucket"\>

Resources to which the Permission Group is scoped

One of the following:

"com.cloudflare.api.account"

"com.cloudflare.api.account.zone"

"com.cloudflare.api.user"

"com.cloudflare.edge.r2.bucket"

#### TokensValue

##### [Roll Token](https://developers.cloudflare.com/api/typescript/resources/user/subresources/tokens/subresources/value/methods/update)

client.user.tokens.value.update(stringtokenID, ValueUpdateParams { body } params, RequestOptionsoptions?): [TokenValue](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20token%5Fvalue%20%3E%20%28schema%29)

PUT/user/tokens/{token\_id}/value