Skip to content
gist.link ↗

Quickstart

This walkthrough takes you from nothing to a successful API call. You’ll list support tickets, but the same steps work for any product — only the audience, endpoint, and permissions change.

You’ll need: an organization admin account for the GistLink suite.

  1. Create an IAM user.

    Sign in and open Settings → Security → IAM users (https://settings.gist.link/dashboard/security/iam-users), then choose New IAM user. Give it a descriptive name (for example ticket-sync-bot) and grant it the permissions it needs:

    support:query:tickets
    support:query:ticket
    support:mutation:createTicket

    Permissions use the <app>:query|mutation:<field> grammar — one entry per operation, with optional trailing wildcards. See Permissions for the full grammar.

  2. Issue an API key.

    On the IAM user’s page, choose Issue key. You can narrow the key to a subset of the user’s permissions (useful for handing different keys to different systems). You’ll receive:

    • a key id — gciam_ followed by hex, safe to store in config; and
    • a one-time secret — gcsk_…, displayed once, never again.

    Store the secret in your secret manager immediately. If it’s lost, rotate the key to get a new one.

  3. Exchange the key for an access token.

    IAM keys use the standard OAuth client_credentials grant against the auth token endpoint. The audience names the one product the token will work on and is required:

    Terminal window
    curl https://auth.api.gist.link/oauth/token \
    -u 'gciam_your_key_id:gcsk_your_secret' \
    -d grant_type=client_credentials \
    -d audience=support
    {
    "access_token": "eyJhbGciOiJSUzI1NiIs…",
    "token_type": "Bearer",
    "expires_in": 900,
    "scope": "support:query:tickets support:query:ticket support:mutation:createTicket"
    }

    The token expires after expires_in seconds (15 minutes by default) — just request a new one when it does. IAM exchanges never return a refresh token. Full endpoint details: Authentication.

  4. Call the API.

    Send GraphQL over POST with the token as a Bearer header:

    Terminal window
    ACCESS_TOKEN="eyJhbGciOiJSUzI1NiIs…"
    curl https://support.api.gist.link/graphql \
    -H "Authorization: Bearer $ACCESS_TOKEN" \
    -H 'Content-Type: application/json' \
    -d '{"query": "query { tickets(first: 10) { totalCount edges { node { id subject status created_at } } } }"}'