The behavior and format of this command are the same for both Astro and Astro Private Cloud.
Bearer prefix stripped, making it suitable for use in scripts and CI/CD pipelines. The command returns an error if you are not authenticated.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Print the current authentication token.
Bearer prefix stripped, making it suitable for use in scripts and CI/CD pipelines. The command returns an error if you are not authenticated.
astro auth token
| Option | Description | Possible Values |
|---|---|---|
-d, --domain | Print the token for a specific context domain instead of the current context. Useful for Astro Private Cloud environments with multiple control planes | Any valid domain string |
astro auth token
# Print the authentication token for the current context
astro auth token --domain cloud.astronomer.io
# Print the token for a specific context domain
# Use in scripts
export ASTRO_TOKEN=$(astro auth token)
curl -H "Authorization: Bearer $ASTRO_TOKEN" https://api.astronomer.io/...
Was this page helpful?