---
title: Manage database tokens
description: Manage database tokens in your InfluxDB Cloud Dedicated cluster. Database tokens grant read and write permissions to one or more databases and allow for actions like writing and querying data.
url: https://docs.influxdata.com/influxdb3/cloud-dedicated/admin/tokens/database/
estimated_tokens: 2901
product: InfluxDB Cloud Dedicated
version: cloud-dedicated
---

# Manage database tokens

InfluxDB Cloud Dedicated database tokens grant read and write permissions to one or more databases and allow for actions like writing and querying data.

### [Create a database token](/influxdb3/cloud-dedicated/admin/tokens/database/create/)

Use the Admin UI, the [`influxctl token create` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/token/create/), or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to create a [database token](/influxdb3/cloud-dedicated/admin/tokens/database/) for reading and writing data in your InfluxDB Cloud Dedicated cluster. Provide a token description and permissions for databases.

##### CLI

```sh
influxctl token create \
  --read-database DATABASE1_NAME \
  --read-database DATABASE2_NAME \
  --write-database DATABASE2_NAME \
  --expires-at 2030-01-01T00:00:00Z \
  "Read-only on DATABASE1_NAME, Read/write on DATABASE2_NAME"
```

##### API

```sh
curl \
  --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/tokens" \
  --header "Accept: application/json" \
  --header 'Content-Type: application/json' \
  --header "Authorization: Bearer MANAGEMENT_TOKEN" \
  --data '{
    "description": "Read-only on DATABASE1_NAME, Read/write on DATABASE2_NAME",
    "permissions": [
      {
        "action": "read",
        "resource": "DATABASE1_NAME"
      },
      {
        "action": "read",
        "resource": "DATABASE2_NAME"
      },
      {
        "action": "write",
        "resource": "DATABASE2_NAME"
      }
    ],
    "expirationType": "datetime",
    "expiresAt": "2030-01-01T00:00:00Z"
  }'
```

### [Update a database token](/influxdb3/cloud-dedicated/admin/tokens/database/update/)

Use the Admin UI, the [`influxctl token update` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/token/update/), or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to update a database token’s permissions in your InfluxDB Cloud Dedicated cluster.

##### CLI

```sh
influxctl token update \
  --read-database <DATABASE_NAME> \
  --read-database <DATABASE2_NAME> \
  --write-database <DATABASE2_NAME> \
  <TOKEN_ID>
```

##### API

```sh
curl \
    --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/tokens/TOKEN_ID" \
    --request PATCH \
    --header "Accept: application/json" \
    --header 'Content-Type: application/json' \
    --header "Authorization: Bearer MANAGEMENT_TOKEN" \
    --data '{
      "permissions": [
        {
          "action": "read",
          "resource": "DATABASE_NAME"
        },
        {
          "action": "read",
          "resource": "DATABASE2_NAME"
        },
        {
          "action": "write",
          "resource": "DATABASE2_NAME"
        }
      ]
    }'
```

### [List database tokens](/influxdb3/cloud-dedicated/admin/tokens/database/list/)

Use the Admin UI, the [`influxctl token list` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/token/list/), or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to list database tokens in your InfluxDB Cloud Dedicated cluster.

##### CLI

```sh
influxctl token list
```

##### API

```sh
curl \
  --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/tokens" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer MANAGEMENT_TOKEN"
```

```sh
curl \
  --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/tokens/TOKEN_ID" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer MANAGEMENT_TOKEN"
```

### [Revoke a database token](/influxdb3/cloud-dedicated/admin/tokens/database/revoke/)

Use the Admin UI, the [`influxctl token revoke` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/token/revoke/), or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to revoke a database token associated with your InfluxDB Cloud Dedicated cluster and remove all permissions associated with the token. Provide the ID of the database token you want to revoke.

##### CLI

```sh
influxctl token revoke <TOKEN_ID>
```

##### API

```sh
curl \
  --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/tokens/TOKEN_ID" \
  --request DELETE \
  --header "Accept: application/json" \
  --header "Authorization: Bearer $MANAGEMENT_TOKEN" \
```
