Created
August 15, 2025 13:58
-
-
Save sandalsoft/d41d9cb99e45eb366e4a3d32f8676293 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check required environment variables | |
| if [ -z "$PROMPTQL_ACCESS_TOKEN" ]; then | |
| echo "Error: PROMPTQL_ACCESS_TOKEN environment variable is not set or empty. Use a project service account token or Personal Access Token (PAT)" >&2 | |
| exit 1 | |
| fi | |
| if [ -z "$PROMPTQL_PROJECT_ID" ]; then | |
| echo "Error: PROMPTQL_PROJECT_ID environment variable is not set or empty" >&2 | |
| exit 1 | |
| fi | |
| curl -s -X POST "${PROMPTQL_TOKEN_REFRESH_URL:-https://auth.pro.hasura.io/ddn/promptql/token}" \ | |
| -H "Authorization: pat $PROMPTQL_ACCESS_TOKEN" \ | |
| -H "x-hasura-project-id: $PROMPTQL_PROJECT_ID" \ | |
| -H "Content-Type: application/json" \ | |
| | jq -r '.token' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment