Manage tokens

Astra Streaming uses two types of tokens that you can generate in Astra.

Astra application tokens

Astra application tokens are access tokens for authentication to the Astra Portal and the Astra Streaming DevOps API. You use these tokens for tenant administration, such as creating tenants and Pulsar tokens (JWT)

To create an Astra application token, see Manage application tokens.

Astra Streaming Pulsar tokens (JWT)

Astra Streaming Pulsar tokens are Apache Pulsar™ JSON Web Token (JWT) for authentication to your Astra Streaming Pulsar cluster through the Pulsar CLI, runtime clients, or the Pulsar Admin API. If necessary, Astra forwards the JWT to the Pulsar cluster for role verification.

You need a Pulsar JWT for actions related to Pulsar tenants, namespaces, messages, topics, and functions, as well as Pulsar CLI/API commands.

You can generate, copy, or delete Astra Streaming Pulsar tokens for each of your Astra Streaming tenants:

  1. In the Astra Portal header, click Applications, and then select Streaming.

  2. Click the name of your tenant where you want to manage tokens.

  3. Click the Settings tab.

  4. In the Token Management section, click Create Token.

  5. Select a token expiration from 7 days to never.

    Practice responsible credential management:

    • Be aware of the security implications for tokens that never expire.

    • Consider how long you actually plan to use the token.

  6. Copy the token and store it securely.

    The token is shown only once.

  7. To delete a token, click Delete.

    Ensure you update your application with a new, valid Pulsar token before deletion. Applications using the deleted Pulsar token will no longer be able to connect to Astra Streaming.

Set environment variables

Consider setting environment variables for sensitive and frequently used values, such as your authentication credentials and tenant connection details:

export TENANT=ASTRA_STREAMING_TENANT_NAME
export WEB_SERVICE_URL=ASTRA_STREAMING_TENANT_WEB_SERVICE_URL
export PULSAR_TOKEN=ASTRA_STREAMING_TENANT_PULSAR_TOKEN
export ASTRA_TOKEN=ASTRA_APPLICATION_TOKEN

When to use the tokens

The required credentials and connection details depend on the tool you use to interact with Astra Streaming:

Astra Streaming DevOps API

To send requests to the Astra Streaming DevOps API, use an Astra application token.

For the DevOps API, the base URL is always https://api.astra.datastax.com.

For example:

Billing report by tenant
curl -sS --fail -L -X GET "https://api.astra.datastax.com/v2/stats/namespaces/$TENANT" \
--header "Accept: application/json" \
--header "Authorization: Bearer $ASTRA_TOKEN"
Astra Streaming Pulsar Admin API

To send requests to the Astra Streaming Pulsar Admin API, use your tenant’s web service URL and a Pulsar token. For example:

Get built-in sinks
curl -sS --fail -L -X GET "$WEB_SERVICE_URL/admin/v3/sinks/builtinsinks" \
-H "Authorization: $ASTRA_PULSAR_TOKEN"
OSS Pulsar REST APIs

To send requests to the open source Apache Pulsar project’s REST APIs, use your tenant’s web service URL and a Pulsar token.

Pulsar CLI

Use a Pulsar token to authenticate with the Pulsar CLI.

The following commands use a Pulsar token declared in the pulsar-admin binary configuration so the token doesn’t have to be passed directly on the command line:

Monitor a topic’s health
bin/pulsar-admin topics stats
Monitor a connector’s health
bin/pulsar-admin sinks status
Astra CLI

Use an Astra application token to authenticate with the Astra CLI.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM