The behavior and format of this command are the same for both Astro and Astro Private Cloud.
Print the current authentication token to standard output. The output contains only the raw token value with the Bearer prefix stripped, making it suitable for use in scripts and CI/CD pipelines. The command returns an error if you are not authenticated.
Usage
astro auth token
Options
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
Examples
astro auth token# Print the authentication token for the current contextastro auth token --domain cloud.astronomer.io# Print the token for a specific context domain# Use in scriptsexport ASTRO_TOKEN=$(astro auth token)curl -H "Authorization: Bearer $ASTRO_TOKEN" https://api.astronomer.io/...