I am trying to get the cloud composer proxy url to trigger dags from cloud function. I am following below blog. however it's failing while retrieving this url.
Command
curl -s -H "Authorization: Bearer `gcloud auth application-default print-access-token`" https://composer.googleapis.com/v1/projects/test/locations/us-east1/environments/test-environment
I tried gcloud auth print-access-token but same error
error
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "CREDENTIALS_MISSING",
"domain": "googleapis.com",
"metadata": {
"method": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment",
"service": "composer.googleapis.com"
}
}
]
}
}

