Airflow Summit 2025 is coming October 07-09. Register now for early bird ticket!

Generate JWT token with simple auth manager

Note

This guide only applies if your environment is configured with simple auth manager.

In order to use the Airflow public API, you need a JWT token for authentication. You can then include this token in your Airflow public API requests. To generate a JWT token, use the Create Token API in Simple auth manager token API.

Example

ENDPOINT_URL="http://localhost:8080/"
curl -X 'POST' \
    "${ENDPOINT_URL}/auth/token" \
    -H 'Content-Type: application/json' \
    -d '{
    "username": "<username>",
    "password": "<password>"
    }'

This process will return a token that you can use in the Airflow public API requests.

If [core] simple_auth_manager_all_admins is set to True, you can also generate a token with no credentials.

ENDPOINT_URL="http://localhost:8080/"
curl -X 'GET' "${ENDPOINT_URL}/auth/token"

Was this entry helpful?