Authentication
You'll want to query the Prismatic API with tools outside of the GraphiQL explorer. To do that, you'll need an API token. When you authenticate against Prismatic through the web application or Prismatic CLI tool, your web browser or CLI tool receives a JWT that can be used to query the API.
To view a short-lived token in the web browser, visit https://app.prismatic.io/get_auth_token/ while logged in.
If you're using the Prismatic CLI tool, use the me:token subcommand.
prism me:token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.Example
Use that token as part of your HTTP authorization header bearer token to authenticate your queries against the API. For example:
export PRISMATIC_API_TOKEN=$(prism me:token)
curl https://app.prismatic.io/api \
--request POST \
--header "Authorization: Bearer ${PRISMATIC_API_TOKEN}" \
--header "Content-Type: application/json" \
--data '{"query": "query { integrations { nodes { id name }}}"}'
API access tokens are valid for 7 days. If you're building a script that will run within your application or from a CI/CD pipeline, you should fetch a refresh token. Refresh tokens have a longer life and let you fetch a new access token whenever you need it. See Setting up a repo for Prismatic for CI/CD integration guidance.