Copy
Ask AI
export BASE=http://localhost:5000
export CLIENT_ID=...
export CLIENT_SECRET=...
curl -s -X POST "$BASE/connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&scope=AdminUIScope" \
| jq -r .access_token | tee token.txt
curl -H "Authorization: Bearer $(cat token.txt)" "$BASE/api/health"
